HomeManualTopicsTypesSymbols

std::partition

partitions a string into several parts and returns a list of these parts

Parameters

text
the string to process
separators*
the separators

Results

None

Description

This function partitions the specified string into several parts. The separators are not removed but start each part.

The function returns a list of the parts.

Example

$str "a:b;c" $parts partition(str ';', ':') dump! parts

Output

list("a" ":b" ";c")

Topic

Strings

See also

std::split splits a string into several parts and returns a list of these parts
std::split_into_lines
std::join concatenates the list items using the specified separator