Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

indexOf(stringToTest, stringToLookFor)

ArgumentTypeDescription
stringToTestStringThe string that will be searched.
stringToLookForStringThe 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.


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

...