f$FindStr (f$TextSuche)
f$FindStr (f$TextSuche)
Determines if a search term appears in a given text. The starting position of the search term within the text is returned. If the search term does not appear in the text, then -1 is given.
The function is case-sensitive. If you would like to perform a search irrespective of case, then you first have to convert the text using f$Upper or f$Lower.
Syntax: | Position = f$FindStr( Text, SearchText [,Start]) | ||
| Argument | Type | Meaning |
| Text | String | Text to be searched through |
| SearchText | String | Text to search for |
| Start | Integer | Starting position of the text to be searched through |
Result: | Integer | Starting position of the search string | |
Example: | Pos = f$FindStr( 'wastewater pump', 'pump' ) → Pos = 12 | ||
| Pos = f$FindStr( 'wastewater pump', 'PUMP' ) → Pos = -1 | ||
| Pos = f$FindStr( 'wastewater pump', 'p',13 ) → Pos = 15 | ||