Versions Compared

Key

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

...

ArgumentTypeDescription
stringToTestStringThe string that will be searched.
stringToLookForString

The sub-string to look for within the string.

...

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


indexOf("Thomas Troubridge", "bridge")

...

indexOf("Space1, Space2 and Space3", "e")

Returns 5, which is the first occurrence of "e". It does not return subsequent occurrences at positions 13 and 24.

...

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


See Also