blob: 37fd8742c2492abbc24affc531c14780349d9e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Text.split_any 3 2025-09-06 "Tomo man-pages"
.SH NAME
Text.split_any \- split a text by multiple delimiters
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Text.split_any\ :\ func(text:\ Text,\ delimiters:\ Text\ =\ "\ $\[rs]t\[rs]r\[rs]n"\ ->\ [Text])
.fi
.SH DESCRIPTION
Splits the text into a list of substrings at one or more occurrences of a set of delimiter characters (grapheme clusters).
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
text Text The text to be split. -
delimiters Text A text containing delimiters to use for splitting the text. "\ $\[rs]t\[rs]r\[rs]n"
.TE
.SH RETURN
A list of subtexts resulting from the split.
.SH NOTES
Splitting will occur on every place where one or more of the grapheme clusters in `delimiters` occurs.
To split based on an exact delimiter, use Text.split().
.SH EXAMPLES
.EX
>> "one, two,,three".split_any(", ")
= ["one", "two", "three"]
.EE
|