Difference between revisions of "SplitText"
m (adding doc status category) |
|||
Line 1: | Line 1: | ||
[[Category:Text Functions]] | [[Category:Text Functions]] | ||
[[Category:Functions that create lists]] | [[Category:Functions that create lists]] | ||
+ | [[Category:Doc Status C]] <!-- For Lumina use, do not change --> | ||
Returns a list of substrings from S by splitting S each time separator occurs. | Returns a list of substrings from S by splitting S each time separator occurs. |
Revision as of 04:37, 25 April 2007
Returns a list of substrings from S by splitting S each time separator occurs.
Declaration
SplitText(S,Separator:textual atomic)
Examples
SplitText('Al#Bob#Carl','#') --> ['Al','Bob','Carl']
Detail Description
If Separator is the empty string, "", the string is split into individual characters.
In general, S and Separator cannot be arrays, since the result is unindexed and would result in more than one unindexed array. Therefore, if S or Separator might be an array, you will need to re-index the result using another index. For example, if you know that all strings will have the same number of elements, and Index I has this same number of elements, you could use:
var s1[] := S do Array(I,SplitText(s1,','))
See Also
Comments
Enable comment auto-refresher