Next Previous Contents

25. create_delimited_string

Synopsis

Concatenate strings using a delimiter

Usage

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

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

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".
Notes

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

See Also

is_list_element, extract_element, strchop, strcat


Next Previous Contents