PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Function: indexOf()

Returns the character position of one string inside another.

Syntax

indexOf(stringToTest, stringToLookFor)

Argument Type Description
stringToTest String The string that will be searched.
stringToLookFor String The string to look for.

Examples

indexOf("Thomas Troubridge", " ")

Returns 7, the position of the space " " in "Thomas Troubridge".

indexOf("Thomas Troubridge", "bridge")

Returns 12.

indexOf("Thomas Troubridge", "x")

Returns 0.

$start = indexOf(in.fileName, "_") + 1, $end = $start + 8, $date = substring(in.fileName, $start, $end)

If in.fileName contained file names like "switchRC48_20060708.exp", the script above would extract the date element of the file name.

See Also

  • No labels