search() Function

Searches the text for a particular substring, returning the positional index of the first character of the first match.

Syntax

search( search_text, within_text, start_num )

search_text: (Text) The text that will be searched for.

within_text: (Text) The text within which the search text will be searched for.

start_num: (Number) The positional index of the first character of the substring to be returned.

Returns

Number

Notes

The search_text parameter does not support wildcard characters.

The first character of the entire within_text value is considered to have an index = 1.

Examples

search("to","boston",1) returns 4

See Also

find(): Use this function to perform a case-sensitive search.

Open in Github Built: Fri, Nov 04, 2022 (07:10:52 PM)

On This Page

FEEDBACK