STD.Str.StartsWith( src, prefix )
STD.Uni.StartsWith( src, prefix, form )
src | The string to search. |
prefix | The string to find. |
form | The type of Unicode normalization to be employed. (NFC, NFD, NFKC, or NFKD) |
Return: | StartsWith returns a BOOLEAN value. |
The StartsWith function returns TRUE if the src starts with the text in the prefix parameter.
Trailing and Leading spaces are stripped from the prefix before matching.
For the Unicode version, unless specified, normalization will not occur. Unless initiated as hex and then converted to Unicode using TRANSFER, ECL will perform its own normalization on your declared Unicode string.
Example:
IMPORT STD; STD.Str.StartsWith('a word away','a word'); //returns TRUE STD.Str.StartsWith('a word away','aword'); //returns FALSE