The system function StrLib.concatenateWithSeparator concatenates two strings, inserting a separator string between them. If the initial length of the target string is zero (not counting trailing blanks and nulls), the separator is omitted and the source string is copied to the target string.
StrLib.concatenateWithSeparator( target VagText inOut, source VagText in, separator VagText in) returns (result INT)
Trailing spaces and nulls are truncated from target; then, the separator string and source are appended to the truncated value. If the concatenation is longer than the target allows, truncation occurs. If the concatenation is shorter than the target allows, the concatenated value is padded with spaces.
phrase = "and"; // CHAR(7) or = "or"; result = StrLib.concatenateWithSeparator(phrase,or,"/"); if (result == 0) print phrase; // phrase = "and/or " end
Related concepts
Syntax diagram for EGL functions
Related reference
EGL library StrLib