Name

mergestring — Joins list elements with a string

Synopsis

string mergestring ( list<string> PIECES ,
  string GLUE );
 

Parameters

list<string> PIECES

A List of strings

string GLUE

Return

string

Description

Returns a string containing a string representation of all the list elements in the same order, with the glue string between each element.

List elements which are not of type strings are ignored.

Usage

  mergestring (["", "abc", "dev", "ghi"], "/") -> "/abc/dev/ghi"
  mergestring (["abc", "dev", "ghi", ""], "/") -> "abc/dev/ghi/"
  mergestring ([1, "a", 3], ".") -> "a"
  mergestring (["1", "a", "3"], ".") -> "a"
  mergestring ([], ".") -> "1.a.3"
  mergestring (["abc", "dev", "ghi"], "") -> "abcdevghi"
  mergestring (["abc", "dev", "ghi"], "123") -> "abc123dev123ghi"