'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Text.split 3 2025-04-21 "Tomo man-pages" .SH NAME Text.split \- split a text by a delimiter .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Text.split\ :\ func(text:\ Text,\ delimiter:\ Text\ =\ ""\ ->\ [Text]) .fi .SH DESCRIPTION Splits the text into a list of substrings based on exact matches of a delimiter. .SH ARGUMENTS .TS allbox; lb lb lbx lb l l l l. Name Type Description Default text Text The text to be split. - delimiter Text The delimiter used to split the text. "" .TE .SH RETURN A list of subtexts resulting from the split. .SH NOTES To split based on a set of delimiters, use Text.split_any(). If an empty text is given as the delimiter, then each split will be the graphical clusters of the text. .SH EXAMPLES .EX >> "one,two,,three".split(",") = ["one", "two", "", "three"] >> "abc".split() = ["a", "b", "c"] .EE