Split strings into substrings between predefined separator symbol(s).
::tuple_split searches within the strings of the input tuple T1 for one or more separators defined in the input tuple T2. ::tuple_split then splits the examined strings into the substrings between the separators. Both input tuples may only consist of strings. Otherwise ::tuple_split returns an error. If the elements of T2 contain more than one character, each character defines a separator. If T1 consists only of one string, this is split up several times according to the elements of T2. For example: If T1 consists of the string ``data1;data2:7;data3'' and T2 contains the strings ``;'' and ``:;'', the output tuple Splitted will comprise the strings ``data1'', ``data2:7'', ``data3'' as the result of splitting the string of T1 according to the first element of T2 and ``data1'', ``data2'', ``7'' und ``data3'' as the result of splitting according to the second element of T2. If both input tuples show the same number of elements, the search is done elementwise. I.e., ::tuple_split will split the first string of T1 according to the separators in the first element of T2, the second string of T1 according to the separators in the second element of T2 and so on. If T2 only contains one string, the separators defined in this string will be used to split up all the strings of T1. If both input tuples contain more than one element and the number of elements differs for the input tuples, ::tuple_split returns an error.
|
T1 (input_control) |
string(-array) -> HTuple.char * |
| Input tuple 1. | |
|
T2 (input_control) |
string(-array) -> HTuple.char * |
| Input tuple 2. | |
|
Splitted (output_control) |
string(-array) -> (HTuple.) char * |
| Substrings after splitting the input strings. | |
::tuple_strstr, ::tuple_strrstr, ::tuple_strchr, ::tuple_strrchr, ::tuple_strlen, ::tuple_str_first_n, ::tuple_str_last_n, ::tuple_environment
Operators not requiring licensing