StringVector
StringVector(separators), StringVector(STACK)
Parameter: Separator as string
Stack | Position | Description |
---|---|---|
Stack(In) | Character string | |
Stack(Out) | Top | [ |
Top 1 | substring n | |
. . . | ||
Top-n | substring 1 | |
Top n-1 | [ |
The string on the stack is split into substrings separated by one or more separator characters in the original string.
Example:
"ABC, defg, hijklm" StringVector(", ") // Result: [ "ABC" "defg" "hijklm" ]
StringVector can also work the other way round and returns a composite string from a stack and a separator:
Stack | Position | Description |
---|---|---|
Stack(In) | Top | [ |
Top 1 | substring n | |
. . . | ||
Top-n | substring 1 | |
Top n-1 | [ | |
Stack(Out) | Result string |
The substrings of the vector are joined to form a result string, with the separators specified in the parameter inserted between two adjacent substrings.
Example:
[ "ABC", "defg", "hijklm" ] StringVector(" + ") // Result: "ABC + defg + hijklm"