StringTools[Explode] - convert a string to a list of characters
StringTools[Implode] - convert a list of characters to a string
|
Calling Sequence
|
|
Explode( s )
Implode( stringList )
|
|
Parameters
|
|
s
|
-
|
string
|
stringList
|
-
|
list of strings
|
|
|
|
|
Description
|
|
•
|
The Explode(s) function converts string s into a list of its individual characters.
|
|
If s is empty, then an empty list is returned. Otherwise, the list consisting of the characters comprising s, in order, is returned. Each string in the returned list has length equal to one (i.e., each string in the list is a single character string).
|
|
This procedure is equivalent to
|
•
|
The Implode(stringList) function is the inverse of the Explode(s) function.
|
|
If stringList is empty, then the empty string is returned. Otherwise, the catenation of the one-character strings in stringList is returned.
|
|
This procedure is equivalent to
|
|
Note: The strings in stringList are all assumed to have length equal to one (whether this is, in fact, true or not). Only the first character of each string is used.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
|
|
Download Help Document
Was this information helpful?