Jump to content
Toggle menu
  • 915 articles
  • 3.8K files
  • 30.2K users
  • 279.2K edits
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

IndexOf

From Catglobe Wiki


indexOf

Returns a 0-based index of the first occurrence of a string in another string. Returns empty if there are no occurrences found.

Syntax

indexOf(stringToSearchFor, stringToSearchIn)

Arguments

stringToSearchFor: is a string expression.

stringToSearchIn: is a string expression.

Return type

number

Example

number result =indexOf("is", "catglobe is tHe beSt");

print(result);

//9

Availability

Version 5.2