Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, GermanyNew Address! -- Neue Adresse! |
STR_INDEX()
Get indices of a substring (SUBSTR) in string.
The IDL intrinsic function STRPOS returns only the index of the first occurrence of a substring. This routine calls itself recursively to get indices of the remaining occurrences.
result= STR_INDEX(str, substr [, offset])
STR -- The string in which the substring is searched for SUBSTR -- The substring to be searched for within STR
OFFSET -- The character position at which the search is begun. If omitted or being negative, the search begins at the first character (character position 0).
RESULT -- Integer scalar or vector containing the indices of SUBSTR within STR. If no substring is found, it is -1.
DELVARX
STR_INDEX -- internal common block. The variable save in the block is deleted upon final exit of this routine.
Utility, string
Written January 3, 1995, Liyun Wang, GSFC/ARC Converted to IDL V5.0 W. Landsman September 1997 Use size(/TNAME) instead of DATATYPE() W. Landsman October 2001
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]