NAME:
NEXTTOK
PURPOSE:
Find the next occurance of any of a set of characters in a
string and return the character which occurs next.
CATEGORY:
text/strings
CALLING SEQUENCE:
tok = nexttok( strn, tokens )
INPUTS:
strn -- string to be searched for sub/superscripts in
tokens -- string containing characters to be found. in
KEYWORD PARAMETERS:
POSITION -- Set to a named variable to get position out
of next token, or -1 if none found.
/HELP -- Print useful message and exit.
OUTPUTS:
tok -- Contains the character among tokens which out
occurs next in strn, or null '' if none found.
COMMON BLOCKS:
SIDE EFFECTS:
NOTES:
EXAMPLE:
nexttok( 'x^2 + N_j^3', '^_', position=pos ) returns '^' and sets
pos to 1.
MODIFICATION HISTORY:
$Id: nexttok.pro 134 2006-07-07 10:19:08Z navarro $
$Log: nexttok.pro,v $
Revision 1.4 2004/06/15 17:25:54 mcraig
Fixed bug in regular expression, changed array notation to square brackets
Revision 1.3 1996/06/14 20:00:27 mcraig
Updated Copyright info.
Revision 1.2 1996/05/09 00:22:17 mcraig
Generalized so that the next occurence of any of a set of characters will
be returned.
Revision 1.1 1996/01/31 18:41:06 mcraig
Initial revision
RELEASE:
$Name: Rel_2_1_2 $
COPYRIGHT:
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.