HomeManualTopicsTypesSymbols

std::split_into_groups

splits already indented lines into groups

Parameter

lines
the indented lines

Results

None

Description

Returns a list of indented lines where each line has a subgroups-attribute which is itself a list of "indented lines".

The division into subgroups is only done on the top-level! The subgroups do not contain any further subgroups.

Example

$text " a 1 2 3 b 4 5 $lines split_into_indented_lines(text) $groups split_into_groups(lines) dump! 3 `groups dump! 3 `subgroups_of(groups(1))

Output

groups: list tuple 0 "a@0xa;" tuple 0 "b@0xa;" subgroups_of(groups(1)): list tuple 2 "1@0xa;" tuple 2 "2@0xa;" tuple 2 "3@0xa;"

Topic

Strings

See also

std::split_into_indented_lines splits a text into indented lines