[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


GETTOK Source code in gettok.pro

GETTOK

Name
       GETTOK
Purpose
       Retrieve the first part of a (vector) string up to a specified character
Explanation
       GET TOKen - Retrieve first part of string until the character char
       is encountered.
Calling Sequence
       token = gettok( st, char, [ /EXACT ] )
Input Parameters
       char - character separating tokens, scalar string
Parameters
       st - string to get token from (on output token is removed),
            scalar or vector
Output Parameters
       token - extracted string value is returned, same dimensions as st
Keyword Parameters
       /EXACT -  The default behaviour of GETTOK is to remove any leading
              blanks and (if the token is a blank) convert tabs to blanks.
              Set the /EXACT keyword to skip these steps and leave the
              input string unchanged before searching for the  character
              tokens.
Example
       If ST is ['abc=999','x=3.4234'] then gettok(ST,'=') would return
       ['abc','x'] and ST would be left as ['999','3.4234']
Procedures Used
       REPCHR()
Revision History
       version 1  by D. Lindler APR,86
       Remove leading blanks    W. Landsman (from JKF)    Aug. 1991
       Converted to IDL V5.0   W. Landsman   September 1997
       V5.3 version, accept vector input   W. Landsman February 2000
       Slightly faster implementation  W. Landsman   February 2001
       Added EXACT keyword  W. Landsman March 2004
       Use COMPLEMENT keyword to WHERE W. Landsman   March 2004

Last modified by pro2html on 2004 April 27 at 03:58 UTC

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

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