Textoidl/
matchdelim.pro
Match open/close delimiters in a string.
matchdelim
Text, String
result = matchdelim(InString[, OpenPos], OPEN_DELIM=OPEN_DELIM, CLOSE_DELIM=CLOSE_DELIM, HELP=HELP)
Return value
Parameters
InString
in
required
type: string
')
OpenPos
in
optional
Set to a named variable to receive the
position of the first opening delimiter.
Keywords
OPEN_DELIM
default: '{'
A single character containing the opening
delimiter (e.g. '(').
CLOSE_DELIM
default: '
'}
A single character containing the closing
delimiter (e.g. ')').
HELP
Examples
matchdelim('{one{two}}three') returns 9, the character just before 'three'.
Version history
Version
$Id: matchdelim.pro 325 2007-12-06 10:04:53Z pinsard $
History
$Log: matchdelim.pro,v $
Revision 1.3 1996/06/14 20:00:27 mcraig
Updated Copyright info.
Revision 1.2 1996/05/09 00:22:17 mcraig
Removed restriction that open delim must be first char. Added argument
to allow for return of position of open delim.
Revision 1.1 1996/01/31 18:41:06 mcraig
Initial revision;
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.
Known issues
Restrictions
Any pair of (nonidentical) characters can be used as delimiters.
Other attributes
Uses routines
Produced by IDLdoc 2.0.