Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  GETTOK

GETTOK

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, /NOTRIM ] )

Input


char - character separating tokens, scalar string

Input-output


st - string to get token from (on output token is removed unless
            /NOTRIM is set), scalar or vector

Output


token - extracted string value is returned, same dimensions as st

Optional Input Keyword


      /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.
      /NOTRIM - if set, then the input string is left unaltered

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']

Procedure Calls


      REPCHR()

History


version 1 by D. Lindler APR,86
Remove leading blanks W. Landsman (from JKF) Aug. 1991
      V5.3 version, accept vector input W. Landsman February 2000
      Slightly faster implementation W. Landsman February 2001
      Added EXACT keyword W. Landsman March 2004
      Assume since V5.4, Use COMPLEMENT keyword to WHERE W. Landsman Apr 2006
      Added NOTRIM keyword W. L. March 2011



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us