[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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

STR_TOKEN Source code in str_token.pro


       Retrieve portion of string up to token.
Calling Sequence
       new = str_token( old, token )
Input Parameters
       old   -- String to be split.  Contains text after    in, out
                token on output.
       token -- Token to use in splitting old.              in
Keyword Parameters
       /TRIM -- set to remove leading blanks from old
                before returning.
       /HELP -- print useful message and exit.
Output Parameters
       new   -- portion of string up to token.              out
       old   -- portion of old after token.                 out, in
Common Blocks

Side Effects
       Input parameter old is modified.
       Token may be one or more characters.
       If token is not found, returns old and sets old to ''.
       If old is 'foo44 bar', then str_token( old, '44' ) would return
       'foo', and upon return, old will be left with ' bar'.  If /TRIM
       were set, old would be 'bar' on return.
       If old='xyz', then new=str_token(old,'a') would return with
       new='xyz' and old=''.
       To D. Linder who wrote GETTOK, part of the goddard library,
       upon which this is based.
Revision History
       $Id: str_token.pro,v 1.1 2000/06/14 19:09:22 mcraig Exp $
       $Log: str_token.pro,v $
       Revision 1.1  2000/06/14 19:09:22  mcraig
       Changed name of strtok str_token to avoid conflict in IDL 5.3.
       Revision 1.3  1996/06/14 20:00:27  mcraig
       Updated Copyright info.
       Revision 1.2  1996/05/09 00:22:17  mcraig
       Added built in help.
       Revision 1.1  1996/01/31 18:47:37  mcraig
       Initial revision
       $Name: Rel_2_1_2 $
  Copyright (C) 1996 The Regents of the University of California, All
  Rights Reserved.  Written by Matthew W. Craig.
  See the file COPYRIGHT for restrictions on distrubting this code.
  This code comes with absolutely NO warranty; see DISCLAIMER for details.

Last modified by pro2html on 2004 June 29 at 21:24 UTC

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

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