strjoin

Concatenates a string with delimiters. (version 4.67 or later)

Format

strjoin <strvar> <separator> [<count>]

Remarks

Concatenates a specified separator string variable <strvar> between each element of the 9 system variables from "groupmatchstr1" to "groupmatchstr9", yielding a single concatenated string.

<separator> is specified delimiter characters.

The <count> is specified the maximum number of substrings to concatenate.
When the <count> is left out, the default value is 9.

Example

groupmatchstr1="Jan"
groupmatchstr2="Feb"
groupmatchstr3="Mar"
groupmatchstr4="Apr"
groupmatchstr5="May"
groupmatchstr6="Jun"
groupmatchstr7="Jul"
groupmatchstr8="Aug"
groupmatchstr9="Sep"
strjoin strvar ","
messagebox strvar "strvar"   ; 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep'

groupmatchstr1="Jan"
groupmatchstr2="Feb"
groupmatchstr3="Mar"
groupmatchstr4="Apr"
groupmatchstr5="May"
groupmatchstr6="Jun"
groupmatchstr7="Jul"
groupmatchstr8="Aug"
groupmatchstr9="Sep"
strjoin strvar " and " 6
messagebox strvar "strvar"   ; 'Jan and Feb and Mar and Apr and May and Jun'

groupmatchstr1="Jan"
groupmatchstr2="Feb"
groupmatchstr3="Mar"
groupmatchstr4="Apr"
groupmatchstr5="May"
groupmatchstr6="Jun"
groupmatchstr7=""
groupmatchstr8=""
groupmatchstr9=""
strjoin strvar "," 9
messagebox strvar "strvar"   ; 'Jan,Feb,Mar,Apr,May,Jun,,,'

See also