You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


find

Returns the index value of the first occurrence of a string within another string.

Example

Find the first occurrence of “e” within “Hello”

find("e", "Hello")

This example returns a 1 (zero offset).

Syntax

find(string s find, string expr field)
  • s: string to search for
  • field: string to be searched

Both s and field are expressions evaluating to the string type.

Returns

int

Notes

find returns the offset in the string field where s can be found. The offset is the index of the first character where the match is found. If there is no match, find returns -1.


© Incorta, Inc. All Rights Reserved.