Description:
Find a substring and return the string after the substring.
Syntax:
substr(s1,s2)
Note:
The function finds string s2 in string s1 starting from the leftmost character and returns the string after s2; return null if there is nothing after s2.
Parameter:
|
s1 |
A string. |
|
s2 |
A string. |
Option:
|
@l |
Return the string before s2; return null if there is nothing before s2. |
|
@q |
Skip the quoted string. |
|
@c |
Case-insensitive. |
Return value:
String
Example:
|
=substr("abcdef","cd") |
ef. |
|
=substr@l("abcdef","cd") |
ab. |
|
=substr@q("ab\'cdef\'","cd") |
No return value. |
|
=substr@c("abCdef","cd") |
ef. |