| 9 January 2002 |
InString() |
| Author | ScriptLogic Corporation |
| Action | Scans a string for the presence of a second string. |
| Syntax | InString (ExpC1, ExpC2, [ExpN]) |
| Parameters | ExpC1 (Required / String) the string to search in. ExpC2 (Required / String) the string to search for. ExpN (Optional / Numeric) If included, InString() searches for the ExpNth occurrence of ExpC2 in ExpC1. By default, InString() searches for the first occurrence of ExpC2 (ExpN = 1). Including ExpN lets you search for additional occurrences of ExpC2 in ExpC1. |
| Remarks | Identical to KiXtart's built-in InStr() function, except that this function support a third, optional parameter for the occurrence. Still need to write an InStringRev function, which would work same way, but from right to left. |
| Returns | Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character. If ExpC2 is not found within ExpC1, or if the ExpNth occurrence is not found, a 0 is returned. |
| Dependencies | None. |
| Examples | |
| Source | |