StrContains

Last Updated2007-02-12
Created At2006-12-30

Tests whether a string is found inside another string.

native int StrContains(const char[] str, const char[] substr, bool caseSensitive = true)

Parameters

const char[] str
String to search in.
const char[] substr
Substring to find inside the original string.
bool caseSensitive
If true (default), search is case sensitive. If false, search is case insensitive.

Return Value

int -1 on failure (no match found). Any other value indicates a position in the string where the match starts.