[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
New Address!   --   Neue Adresse!
[Uni logo]


STR_INDEX() Source code in str_index.pro

STR_INDEX()

Name
       STR_INDEX()
Purpose
       Get indices of a substring (SUBSTR) in string.
Explanation
       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.
Calling Sequence
       result= STR_INDEX(str, substr [, offset])
Input Parameters
       STR    -- The string in which the substring is searched for
       SUBSTR -- The substring to be searched for within STR
Optional Input Parameters
       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).
Output Parameters
       RESULT -- Integer scalar or vector containing the indices of SUBSTR
                 within STR. If no substring is found, it is -1.
Procedures Used
       DELVARX
Common Blocks
       STR_INDEX -- internal common block. The variable save in the block is
                    deleted upon final exit of this routine.
Category
       Utility, string
Revision History
       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

Last modified by pro2html on 2001 October 30 at 04:43 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically