FIND
Syntax:
FIND ( string-1 , string-2 [ , start-pos ] )
Description: Performs a case-sensitive search for the first occurrence of string-1 in string-2, starting at character position start-pos within string-2. (FIND
is intended for use with languages that use the single-byte character set (SBCS), whereas FINDB
(§3.17.7.119) is intended for use with languages that use the double-byte character set (DBCS).)
Arguments:
Name |
Type |
Description |
---|---|---|
string-1 |
text |
Designate the string to be searched for within the string designated by string-2. |
string-2 |
text |
|
start-pos |
number |
The number of the start position within string-2 for which string-1 is to be searched. The start position of the first character is 1. If omitted, a position of 1 shall be assumed. start-pos shall be at least 0. |
Return Type and Value: number – The start position of the first occurrence of string-1 in string-2, starting at character position start-pos within string-2. If string-1 is an empty string, it shall always be found in any string-2 at position start-pos, or at position 1 if start-pos is omitted.
However, if
string-1 is not found within string-2,
#VALUE!
is returned.start-pos designates a position outside string-2,
#VALUE!
is returned.