strCommaAppendNoDuplicates

This function appends a new token to an existing string. It returns the string plus a comma plus the new token. If the token already exists in the string, it is not added.

Type and Usage

Parameters

Takes two parameters:

  • The first parameter is the string.

  • The second parameter is the token.

Example

<$myString = strCommaAppendNoDuplicates(myString, "A")$>
<$myString = strCommaAppendNoDuplicates(myString, "B")$>
<$myString = strCommaAppendNoDuplicates(myString, "C")$>
<$myString = strCommaAppendNoDuplicates(myString, "A")$>
<$myString = strCommaAppendNoDuplicates(myString, "B")$>