The STRJOIN function collapses a string scalar or array into merged strings. This function reduces the rank of its input array by one dimension. The strings in the removed first dimension are concatenated into a single string using the string in Delimiter to separate them.
Result = STRJOIN( String [, Delimiter] [, /SINGLE] )
Returns the merged strings.
A string scalar or array to be collapsed into merged strings.
The separator string to use between the joined strings. If Delimiter is not specified, an empty string is used.
If SINGLE is set, the entire String is joined into a single scalar string result.
Replace all the blanks in a sentence with colons:
str = 'Out, damned spot! Out I say!' print, (STRJOIN(STRSPLIT(str, /EXTRACT), ':'))
IDL prints:
Out,:damned:spot!:Out:I:say!
Introduced: 5.3
STRCMP, STREGEX, STRMATCH, STRMID, STRPOS, STRSPLIT