FindString

Last Updated2025-11-08
Created At2014-07-05

Returns the index for the first occurrence of the provided string. If the string cannot be located, -1 will be returned.

native int FindString(const char[] item, int block = 0, int start = -1, bool reverse = false, bool caseSensitive = true)

Parameters

const char[] item
String to search for.
int block
Optionally which block to search in.
int start
Index to start searching from (exclusive), or -1 for direction default. Valid numbers are in the interval [-1..Length].
bool reverse
Whether the search direction should be reversed.
bool caseSensitive
If true (default), comparison is case sensitive. If false, comparison is case insensitive.

Return Value

int Array index, or -1 on failure

Error

Invalid block, or invalid start index.