divides a string into pieces as designated by a separator string. STR_SEP returns a string array where each element is a separated piece of the original string.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
Result = STR_SEP(
The string to be separated.
The separator string.
Set this keyword to remove leading and trailing blanks from each element of the returned string array. TRIM performs STRTRIM(
Set this keyword to remove all blanks from each element of the returned string array. REMOVE_ALL performs STRCOMPRESS(
Set this keyword to interpret the characters following the <ESC> character literally and not as separators. For example, if the separator is a comma and the escape character is a backslash, the character sequence "a\,b" is interpreted as a single field containing the characters "a,b".
str = 'Doug.is.a.cool.dude!'
parts = STR_SEP(str, '.')
PARTS STRING = Array