About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/create_delimited_string.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 create_delimited_string Context: slangrtl

Synopsis

Concatenate strings using a delimiter

Syntax

String_Type create_delimited_string (delim, s_1, s_2, ..., s_n, n)

Description

    String_Type delim, s_1, ..., s_n
    Integer_Type n

create_delimited_string performs a concatenation operation on the n strings s_1, ...,s_n, using the string delim as a delimiter. The resulting string is equivalent to one obtained via

      s_1 + delim + s_2 + delim + ... + s_n

Example

One use for this function is to construct path names, e.g.,

    create_delimited_string ("/", "user", "local", "bin", 3);

will produce "usr/local/bin".

The expression strcat(a,b) is equivalent to create_delimited_string("", a, b, 2).

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.