StrFind (script event)
The information on this page is specific to Quake 4 .
Game class
This event operates on an instance of the game class type {{{gameclass}}}
Description
Checks whether a substring exists in a string.
Usage
float strFind( string source , string sub )
Parameters
- [source] - Original string to perform the search on.
- [sub] - Substring to search for.
Examples
sys.strFind( "The quick brown fox jumps over the lazy dog", "fox" );
Notes
Returns 0 if substring is not found, if found returns the position in the original string where the substring starts at.