...
Argument | Type | Description |
---|---|---|
stringToTest | String | The string that will be searched. |
stringToLookFor | String | The sub-string to look for within the string. |
...
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.