Usage

Syntax: str.pos(substring)
Returns index.

Explanation

Returns an index, which is where the substring starts in the string.

Example

function onCreated()
{
  temp.string = "helloworld";
  echo(temp.string.pos("world"));
}

... Will output 5 in RC when on the serverside, or in your F2 menu when on the clientside. If the output is -1, then the substring was not found in the variable.

Categories

CategoryObjectFunction
CategoryFunctionClientside
CategoryFunctionServerside

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki