Feature Rich
Rapid Application Development
Helping you or your customers
Manage their Business

All Commands All String
Commands

SPLIT

This will split a string by a specified search string and place the results in an array variable.

It will split at each occurance of the string and removes the caracter from the resultant string.

Each element can then be referenced individually.

Any data in the array before the command is run will be cleared.

This command can have an {END_SPLIT} command.

In this case, the string in-between will replace the first parameter and the format will be {SPLIT} string {{END_SPLIT(parameters 2 onwards)}

This is particularly useful if the string is particularly long or contains commas.

Number Name Default Type Description
1 string String The string to split
2 search_string String The value to use to split the string by.
You can use CRLF to split by carriage return linefeed. In this case, if there is no carriage return line feed in the source string then just a line feed will be used.
3 name String The name of the array variable to place the result in.
You need to have declared the variable prior to use using the VAR command. e.g. {VAR(V_ROWS())}
4 return 0 Integer The Value to return from the Function:-
0 = Nothing
1 = TRUE or FALSE depending on a successful split
2 = The number of elements in the resulting array
Example
["A","B","C","D","E","F"]
V_ARY(0) = A
to add a Comment.