The function searches for occurrence of a subtext in
a text.
Declaration
INT %FindStr(
TEXT in Text,
TEXT in subText
BOOL in direction := @TRUE
)
Parameters
text
Text, which is to be searched.
subText
Text to search.
direction
@TRUE - searching from the text beginning.
@FALSE - searching from the text end.
Example
The function will return the index of the occurrence of the text
subText from the beginning, if the parameter direction is not
entered, or gets the value @TRUE. If the parameter direction is
entered, the search is executed from the end. If the search is not
successful, the function returns the value 0.
%FindStr("text some text", "text") ; returns the value of 1
%FinsStr("text some text", "text", @TRUE) ; returns the value of 1
%findStr("text some text", "text", @FALSE) ; returns the value of 13
0 komentárov