subStringBefore
Returns the part of a string that precedes a given value.
Information noteNote: This feature is only available in
Talend Data Mapper.
The substring returned is the part of the first argument that precedes the first occurrence of the second argument.
If one of the arguments is an empty string or if the second argument is not found in the first argument, the function returns an empty string.
Arguments
- Input string.
- Substring of the input string.
Examples
Expression | Result |
---|---|
subStringBefore("Hello World", "l") | "He" |
subStringBefore("", "l") | "" |
subStringBefore("Hello World", "") | "" |
subStringBefore("Hello World", "v") | "" |