User Tools

Site Tools


4rpl:commands:split

Index
Strings

Split

Split (<-string <-delimiter) ->list

Description

Takes two strings from the stack and splits the first wherever the second occurs. Returns a list of strings.
Note that the delimiter will split the string for every char within the delimiter. So if the delimiter is “ab” it will split the string for every individual `a` and `b` encountered, not every “ab”.

Examples

Split("Here is a sentence with some words in." " ") ->wordsList
<-wordsList GetListCount 0 do
    Trace(<-wordsList[I])
loop

Index

4rpl/commands/split.txt · Last modified: 2024/04/13 14:27 by Vertu