Returns the portion of the string that occurs before the first occurrence of substr. If substr does not occur in string, the function returns an empty string.
Built-in, C++, C#, Java, XQuery, XSLT 1.0, XSLT 2.0, XSLT 3.0.
Name |
Description |
---|---|
string |
The input string. |
substr |
The sub-string. Any characters before the first occurrence of substr are the result of the function. |
If the input string is MapForce, and substr is Force, the function returns Map. If the input string is 2020/01/04 and substr is /, the function returns 2020.