StrFind (script event)

From modwiki

Jump to: navigation, search
Image:Q4square_bg.png The information on this page is specific to Quake 4.

Description

Checks whether a substring exists in a string.

Usage

In your script type...

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.


Personal tools
Main