diff options
Diffstat (limited to 'man/man3/tomo-Text.slice.3')
| -rw-r--r-- | man/man3/tomo-Text.slice.3 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/man/man3/tomo-Text.slice.3 b/man/man3/tomo-Text.slice.3 index 8c4cd9f0..c89e9b6f 100644 --- a/man/man3/tomo-Text.slice.3 +++ b/man/man3/tomo-Text.slice.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.slice 3 2025-04-19T14:30:40.368043 "Tomo man-pages" +.TH Text.slice 3 2025-04-19T14:48:15.717712 "Tomo man-pages" .SH NAME Text.slice \- Get a slice of the text. @@ -10,7 +10,7 @@ Text.slice \- Get a slice of the text. Tomo Standard Library .SH SYNOPSIS .nf -.BI "Text.slice : func(text: Text, from: Int = 1, to: Int = -1 -> Text)" +.BI Text.slice\ :\ func(text:\ Text,\ from:\ Int\ =\ 1,\ to:\ Int\ =\ -1\ ->\ Text) .fi .SH DESCRIPTION @@ -27,7 +27,10 @@ from Int The index of the first grapheme cluster to include (1-indexed). 1 to Int The index of the last grapheme cluster to include (1-indexed). -1 .TE .SH RETURN -The text that spans the given grapheme cluster indices. Note: 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. +The text that spans the given grapheme cluster indices. + +.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 |
