IDL

STRJOIN

STRJOIN

The STRJOIN function collapses a one-dimensional string array into a single merged string or two-dimensional string array into a one-dimensional array of merged strings. The strings in the removed first dimension are concatenated into a single string using the string in Delimiter to separate them.

Examples


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!

Syntax


Result = STRJOIN( String [, Delimiter] [, /SINGLE] )

Return Value


Returns the merged strings.

Arguments


String

A string array to be collapsed into merged strings.

Delimiter

The separator string to use between the joined strings. If Delimiter is not specified, an empty string is used.

Keywords


SINGLE

If SINGLE is set, the entire String is joined into a single scalar string result.

Version History


5.3

Introduced

See Also


String Operations, String Processing, STRCMP, STREGEX, STRMATCH, STRMID, STRPOS, STRSPLIT



Notes


This page has no user notes yet. Be the first one!


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2014 Exelis Visual Information Solutions