...
Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpfFindLastCharInString (str : STRING;
char : STRING(1) FIXED)
indexOfMatchingChar : INTEGER;
|
The function xpfFindLastCharInString searches the string str for the last occurance occurrence of the character char. If char is found in str then the index of the character char in str is returned as the function value. If char is not found in str zero is the returned function value. See also xpfFindFirstCharInString
Arguments
...
Type | Name | Comment |
STRING | str | Input string |
STRING(1) FIXED | char | The character to be searched for |
Return Value
...
Type | Name | Comment |
INTEGER | indexOfMatchingChar | Index of the last occurrence of the given character |
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
-- cut file name from concatenated path/name string
i := xpfFindLastCharInString(pathname,'\');
IF i>0 THEN
file_name := pathname[i+1:LENGTH(pathname)];
ELSE
file_name := pathname;
END_IF; |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|