'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Text.from 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from \- slice from a starting index .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Text.from\ :\ func(text:\ Text,\ first:\ Int\ ->\ Text) .fi .SH DESCRIPTION Get a slice of the text, starting at the given position. .SH ARGUMENTS .TS allbox; lb lb lbx l l l. Name Type Description text Text The text to be sliced. first Int The index to begin the slice. .TE .SH RETURN The text from the given grapheme cluster to the end of the text. .SH NOTES A negative index counts backwards from the end of the text, so `-1` refers to the last cluster, `-2` the second-to-last, etc. Slice ranges will be truncated to the length of the text. .SH EXAMPLES .EX assert "hello".from(2) == "ello" assert "hello".from(-2) == "lo" .EE .SH SEE ALSO .BR Tomo-Text (3)