Skip to content

string_find_first

Hyomoto edited this page Jun 13, 2021 · 5 revisions
Jump To Go Back Arguments

string_find_first( chars, string, *start_at )

Returns: string

Throws: InvalidArgumentType, IndexOutOfBounds

Searches the given array for the first occurance of the given characters and returns that position. If a non-string is provided for chars or string, or start_at is not a number, InvalidArgumentType will be thrown. If start_at is outside of the bounds of the string, IndexOutOfBounds will be thrown.

string_find_first( "abc", "the cat broke the vase" );
Output: 5 (the position of the first c)

Arguments

Name Type Purpose
chars string A string of characters to search for
string string The string to search
*start_at int optional: The position to start the search

Clone this wiki locally