- NAME
STRCOMPRESS2
- PURPOSE
Remove blanks around specified characters in a string
- CALLING SEQUENCE
newstring = strcompress2( st, chars)
- INPUTS
st - any scalar string
hars - scalar or vector string specifing which characters around which
blanks should be removed. For example, if chars=['=','-','+']
then spaces around the three characters "=', '-', and '+' will
be removed.
- OUTPUTS
newstring - input string with spaces removed around the specified
characters.
- EXAMPLE
The Vizier constraint string (see queryvizier.pro) does not allow
blanks around the operators '=','<', or '>'. But we do not want
to remove blanks around names (e.g. 'NGC 5342'):
IDL> st = 'name = NGC 5342, v< 23'
IDL> print,strcompress2(st, ['=','<','>'])
name=NGC 5342, v<23
- MODIFICATION HISTORY
Written by W.Landsman July 2008