diff options
Diffstat (limited to 'man/man3')
225 files changed, 2405 insertions, 236 deletions
diff --git a/man/man3/tomo-Bool.3 b/man/man3/tomo-Bool.3 new file mode 100644 index 00000000..dd090c86 --- /dev/null +++ b/man/man3/tomo-Bool.3 @@ -0,0 +1,19 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Bool 3 2025-11-29 "Tomo man-pages" +.SH NAME +Bool \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Bool.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Bool?) +Converts a text representation of a boolean value into a boolean. Acceptable boolean values are case-insensitive variations of \fByes\fR/\fBno\fR, \fBy\fR/\fBn\fR, \fBtrue\fR/\fBfalse\fR, \fBon\fR/\fBoff\fR. + +For more, see: +.BR Tomo-Bool.parse (3) + diff --git a/man/man3/tomo-Bool.parse.3 b/man/man3/tomo-Bool.parse.3 index 8fe9f2dd..af2e3f67 100644 --- a/man/man3/tomo-Bool.parse.3 +++ b/man/man3/tomo-Bool.parse.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Bool.parse 3 2025-09-21 "Tomo man-pages" +.TH Bool.parse 3 2025-11-29 "Tomo man-pages" .SH NAME Bool.parse \- parse into boolean .SH LIBRARY @@ -39,3 +39,5 @@ remainder : Text assert Bool.parse("yesJUNK", &remainder) == yes assert remainder == "JUNK" .EE +.SH SEE ALSO +.BR Tomo-Bool (3) diff --git a/man/man3/tomo-Byte.3 b/man/man3/tomo-Byte.3 new file mode 100644 index 00000000..94ec4213 --- /dev/null +++ b/man/man3/tomo-Byte.3 @@ -0,0 +1,51 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Byte 3 2025-11-29 "Tomo man-pages" +.SH NAME +Byte \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Byte.get_bit\ :\ func(i:\ Byte,\ bit_index:\ Int\ ->\ Bool) +In the binary representation of a byte, check whether a given bit index is set to 1 or not. + +For more, see: +.BR Tomo-Byte.get_bit (3) + + +.TP +.BI Byte.hex\ :\ func(byte:\ Byte,\ uppercase:\ Bool\ =\ yes,\ prefix:\ Bool\ =\ no\ ->\ Text) +Convert a byte to a hexidecimal text representation. + +For more, see: +.BR Tomo-Byte.hex (3) + + +.TP +.BI Byte.is_between\ :\ func(x:\ Byte,\ low:\ Byte,\ high:\ Byte\ ->\ Bool) +Determines if an integer is between two numbers (inclusive). + +For more, see: +.BR Tomo-Byte.is_between (3) + + +.TP +.BI Byte.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Byte?) +Parse a byte literal from text. + +For more, see: +.BR Tomo-Byte.parse (3) + + +.TP +.BI Byte.to\ :\ func(first:\ Byte,\ last:\ Byte,\ step:\ Byte?\ =\ none\ ->\ func(->Byte?)) +Returns an iterator function that iterates over the range of bytes specified. + +For more, see: +.BR Tomo-Byte.to (3) + diff --git a/man/man3/tomo-Byte.get_bit.3 b/man/man3/tomo-Byte.get_bit.3 index b815e9d4..2e383fff 100644 --- a/man/man3/tomo-Byte.get_bit.3 +++ b/man/man3/tomo-Byte.get_bit.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Byte.get_bit 3 2025-09-21 "Tomo man-pages" +.TH Byte.get_bit 3 2025-11-29 "Tomo man-pages" .SH NAME Byte.get_bit \- check whether a bit is set .SH LIBRARY @@ -38,3 +38,5 @@ assert Byte(6).get_bit(2) == yes assert Byte(6).get_bit(3) == yes assert Byte(6).get_bit(4) == no .EE +.SH SEE ALSO +.BR Tomo-Byte (3) diff --git a/man/man3/tomo-Byte.hex.3 b/man/man3/tomo-Byte.hex.3 index c09ba5c1..35f6c001 100644 --- a/man/man3/tomo-Byte.hex.3 +++ b/man/man3/tomo-Byte.hex.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Byte.hex 3 2025-09-21 "Tomo man-pages" +.TH Byte.hex 3 2025-11-29 "Tomo man-pages" .SH NAME Byte.hex \- convert to hexidecimal .SH LIBRARY @@ -24,7 +24,7 @@ l l l l. Name Type Description Default byte Byte The byte to convert to hex. - uppercase Bool Whether or not to use uppercase hexidecimal letters. yes -prefix Bool Whether or not to prepend a `0x` prefix. no +prefix Bool Whether or not to prepend a \fB0x\fR prefix. no .TE .SH RETURN The byte as a hexidecimal text. @@ -33,3 +33,5 @@ The byte as a hexidecimal text. .EX assert Byte(18).hex() == "0x12" .EE +.SH SEE ALSO +.BR Tomo-Byte (3) diff --git a/man/man3/tomo-Byte.is_between.3 b/man/man3/tomo-Byte.is_between.3 index 042747ac..8c7e871c 100644 --- a/man/man3/tomo-Byte.is_between.3 +++ b/man/man3/tomo-Byte.is_between.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Byte.is_between 3 2025-09-21 "Tomo man-pages" +.TH Byte.is_between 3 2025-11-29 "Tomo man-pages" .SH NAME Byte.is_between \- test if inside a range .SH LIBRARY @@ -35,3 +35,5 @@ assert Byte(7).is_between(1, 10) == yes assert Byte(7).is_between(100, 200) == no assert Byte(7).is_between(1, 7) == yes .EE +.SH SEE ALSO +.BR Tomo-Byte (3) diff --git a/man/man3/tomo-Byte.parse.3 b/man/man3/tomo-Byte.parse.3 index 57dbaee2..fcc7e75e 100644 --- a/man/man3/tomo-Byte.parse.3 +++ b/man/man3/tomo-Byte.parse.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Byte.parse 3 2025-09-21 "Tomo man-pages" +.TH Byte.parse 3 2025-11-29 "Tomo man-pages" .SH NAME Byte.parse \- convert text to a byte .SH LIBRARY @@ -38,3 +38,5 @@ remainder : Text assert Byte.parse("123xyz", &remainder) == Byte(123) assert remainder == "xyz" .EE +.SH SEE ALSO +.BR Tomo-Byte (3) diff --git a/man/man3/tomo-Byte.to.3 b/man/man3/tomo-Byte.to.3 index 15774ba7..39946e8d 100644 --- a/man/man3/tomo-Byte.to.3 +++ b/man/man3/tomo-Byte.to.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Byte.to 3 2025-10-11 "Tomo man-pages" +.TH Byte.to 3 2025-11-29 "Tomo man-pages" .SH NAME Byte.to \- iterate over a range of bytes .SH LIBRARY @@ -24,7 +24,7 @@ l l l l. Name Type Description Default first Byte The starting value of the range. - last Byte The ending value of the range. - -step Byte? An optional step size to use. If unspecified or `none`, the step will be inferred to be `+1` if `last >= first`, otherwise `-1`. none +step Byte? An optional step size to use. If unspecified or \fBnone\fR, the step will be inferred to be \fB+1\fR if \fBlast >= first\fR, otherwise \fB-1\fR. none .TE .SH RETURN An iterator function that returns each byte in the given range (inclusive). @@ -41,3 +41,5 @@ assert [x for x in Byte(2).to(5)] == [Byte(2), Byte(3), Byte(4), Byte(5)] assert [x for x in Byte(5).to(2)] == [Byte(5), Byte(4), Byte(3), Byte(2)] assert [x for x in Byte(2).to(5, step=2)] == [Byte(2), Byte(4)] .EE +.SH SEE ALSO +.BR Tomo-Byte (3) diff --git a/man/man3/tomo-CString.3 b/man/man3/tomo-CString.3 new file mode 100644 index 00000000..dac93133 --- /dev/null +++ b/man/man3/tomo-CString.3 @@ -0,0 +1,27 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH CString 3 2025-11-29 "Tomo man-pages" +.SH NAME +CString \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI CString.as_text\ :\ func(str:\ CString\ ->\ Text) +Convert a C string to Text. + +For more, see: +.BR Tomo-CString.as_text (3) + + +.TP +.BI CString.join\ :\ func(glue:\ CString,\ pieces:\ [CString]\ ->\ CString) +Join a list of C strings together with a separator. + +For more, see: +.BR Tomo-CString.join (3) + diff --git a/man/man3/tomo-CString.as_text.3 b/man/man3/tomo-CString.as_text.3 index 463a6f98..c896861a 100644 --- a/man/man3/tomo-CString.as_text.3 +++ b/man/man3/tomo-CString.as_text.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH CString.as_text 3 2025-10-18 "Tomo man-pages" +.TH CString.as_text 3 2025-11-29 "Tomo man-pages" .SH NAME CString.as_text \- convert a C string to Text .SH LIBRARY @@ -31,3 +31,5 @@ The C string as a Text. .EX assert CString("Hello").as_text() == "Hello" .EE +.SH SEE ALSO +.BR Tomo-CString (3) diff --git a/man/man3/tomo-CString.join.3 b/man/man3/tomo-CString.join.3 index 27e74495..a4aa16f3 100644 --- a/man/man3/tomo-CString.join.3 +++ b/man/man3/tomo-CString.join.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH CString.join 3 2025-10-18 "Tomo man-pages" +.TH CString.join 3 2025-11-29 "Tomo man-pages" .SH NAME CString.join \- join a list of C strings .SH LIBRARY @@ -32,3 +32,5 @@ A C string of the joined together bits. .EX assert CString(",").join([CString("a"), CString("b")]) == CString("a,b") .EE +.SH SEE ALSO +.BR Tomo-CString (3) diff --git a/man/man3/tomo-Int.3 b/man/man3/tomo-Int.3 new file mode 100644 index 00000000..2476a27b --- /dev/null +++ b/man/man3/tomo-Int.3 @@ -0,0 +1,131 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Int 3 2025-11-29 "Tomo man-pages" +.SH NAME +Int \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Int.abs\ :\ func(x:\ Int\ ->\ Int) +Calculates the absolute value of an integer. + +For more, see: +.BR Tomo-Int.abs (3) + + +.TP +.BI Int.choose\ :\ func(n:\ Int,\ k:\ Int\ ->\ Int) +Computes the binomial coefficient of the given numbers (the equivalent of \fBn\fR choose \fBk\fR in combinatorics). This is equal to \fBn.factorial()/(k.factorial() * (n-k).factorial())\fR. + +For more, see: +.BR Tomo-Int.choose (3) + + +.TP +.BI Int.clamped\ :\ func(x:\ Int,\ low:\ Int,\ high:\ Int\ ->\ Int) +Returns the given number clamped between two values so that it is within that range. + +For more, see: +.BR Tomo-Int.clamped (3) + + +.TP +.BI Int.factorial\ :\ func(n:\ Int\ ->\ Text) +Computes the factorial of an integer. + +For more, see: +.BR Tomo-Int.factorial (3) + + +.TP +.BI Int.get_bit\ :\ func(i:\ Int,\ bit_index:\ Int\ ->\ Bool) +In the binary representation of an integer, check whether a given bit index is set to 1 or not. + +For more, see: +.BR Tomo-Int.get_bit (3) + + +.TP +.BI Int.hex\ :\ func(i:\ Int,\ digits:\ Int\ =\ 0,\ uppercase:\ Bool\ =\ yes,\ prefix:\ Bool\ =\ yes\ ->\ Text) +Converts an integer to its hexadecimal representation. + +For more, see: +.BR Tomo-Int.hex (3) + + +.TP +.BI Int.is_between\ :\ func(x:\ Int,\ low:\ Int,\ high:\ Int\ ->\ Bool) +Determines if an integer is between two numbers (inclusive). + +For more, see: +.BR Tomo-Int.is_between (3) + + +.TP +.BI Int.is_prime\ :\ func(x:\ Int,\ reps:\ Int\ =\ 50\ ->\ Bool) +Determines if an integer is a prime number. + +For more, see: +.BR Tomo-Int.is_prime (3) + + +.TP +.BI Int.next_prime\ :\ func(x:\ Int\ ->\ Int) +Finds the next prime number greater than the given integer. + +For more, see: +.BR Tomo-Int.next_prime (3) + + +.TP +.BI Int.octal\ :\ func(i:\ Int,\ digits:\ Int\ =\ 0,\ prefix:\ Bool\ =\ yes\ ->\ Text) +Converts an integer to its octal representation. + +For more, see: +.BR Tomo-Int.octal (3) + + +.TP +.BI Int.onward\ :\ func(first:\ Int,\ step:\ Int\ =\ 1\ ->\ Text) +Return an iterator that counts infinitely from the starting integer (with an optional step size). + +For more, see: +.BR Tomo-Int.onward (3) + + +.TP +.BI Int.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Int?) +Converts a text representation of an integer into an integer. + +For more, see: +.BR Tomo-Int.parse (3) + + +.TP +.BI Int.prev_prime\ :\ func(x:\ Int\ ->\ Int?) +Finds the previous prime number less than the given integer. If there is no previous prime number (i.e. if a number less than \fB2\fR is provided), then the function will create a runtime error. + +For more, see: +.BR Tomo-Int.prev_prime (3) + + +.TP +.BI Int.sqrt\ :\ func(x:\ Int\ ->\ Int) +Calculates the nearest square root of an integer. + +For more, see: +.BR Tomo-Int.sqrt (3) + + +.TP +.BI Int.to\ :\ func(first:\ Int,\ last:\ Int,\ step:\ Int?\ =\ none\ ->\ func(->Int?)) +Returns an iterator function that iterates over the range of numbers specified. + +For more, see: +.BR Tomo-Int.to (3) + diff --git a/man/man3/tomo-Int.abs.3 b/man/man3/tomo-Int.abs.3 index d5f212cd..ad5d9411 100644 --- a/man/man3/tomo-Int.abs.3 +++ b/man/man3/tomo-Int.abs.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.abs 3 2025-09-21 "Tomo man-pages" +.TH Int.abs 3 2025-11-29 "Tomo man-pages" .SH NAME Int.abs \- absolute value .SH LIBRARY @@ -31,3 +31,5 @@ The absolute value of `x`. .EX assert (-10).abs() == 10 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.choose.3 b/man/man3/tomo-Int.choose.3 index 5d178732..231d75f0 100644 --- a/man/man3/tomo-Int.choose.3 +++ b/man/man3/tomo-Int.choose.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.choose 3 2025-09-21 "Tomo man-pages" +.TH Int.choose 3 2025-11-29 "Tomo man-pages" .SH NAME Int.choose \- binomial coefficient .SH LIBRARY @@ -32,3 +32,5 @@ The binomial coefficient, equivalent to the number of ways to uniquely choose `k .EX assert (4).choose(2) == 6 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.clamped.3 b/man/man3/tomo-Int.clamped.3 index fbfe9fa8..deb1a98b 100644 --- a/man/man3/tomo-Int.clamped.3 +++ b/man/man3/tomo-Int.clamped.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.clamped 3 2025-09-21 "Tomo man-pages" +.TH Int.clamped 3 2025-11-29 "Tomo man-pages" .SH NAME Int.clamped \- clamp an integer .SH LIBRARY @@ -33,3 +33,5 @@ The first argument clamped between the other two arguments. .EX assert (2).clamped(5, 10) == 5 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.factorial.3 b/man/man3/tomo-Int.factorial.3 index 34efbfa2..accebcdb 100644 --- a/man/man3/tomo-Int.factorial.3 +++ b/man/man3/tomo-Int.factorial.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.factorial 3 2025-09-21 "Tomo man-pages" +.TH Int.factorial 3 2025-11-29 "Tomo man-pages" .SH NAME Int.factorial \- factorial .SH LIBRARY @@ -31,3 +31,5 @@ The factorial of the given integer. .EX assert (10).factorial() == 3628800 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.get_bit.3 b/man/man3/tomo-Int.get_bit.3 index d2009d58..d5614a6a 100644 --- a/man/man3/tomo-Int.get_bit.3 +++ b/man/man3/tomo-Int.get_bit.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.get_bit 3 2025-09-21 "Tomo man-pages" +.TH Int.get_bit 3 2025-11-29 "Tomo man-pages" .SH NAME Int.get_bit \- check whether a bit is set .SH LIBRARY @@ -38,3 +38,5 @@ assert (6).get_bit(2) == yes assert (6).get_bit(3) == yes assert (6).get_bit(4) == no .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.hex.3 b/man/man3/tomo-Int.hex.3 index fcfee9de..37fe45e4 100644 --- a/man/man3/tomo-Int.hex.3 +++ b/man/man3/tomo-Int.hex.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.hex 3 2025-09-21 "Tomo man-pages" +.TH Int.hex 3 2025-11-29 "Tomo man-pages" .SH NAME Int.hex \- convert to hexidecimal .SH LIBRARY @@ -34,3 +34,5 @@ The hexadecimal string representation of the integer. .EX assert (255).hex(digits=4, uppercase=yes, prefix=yes) == "0x00FF" .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.is_between.3 b/man/man3/tomo-Int.is_between.3 index 41c84c15..261bb5a4 100644 --- a/man/man3/tomo-Int.is_between.3 +++ b/man/man3/tomo-Int.is_between.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.is_between 3 2025-09-21 "Tomo man-pages" +.TH Int.is_between 3 2025-11-29 "Tomo man-pages" .SH NAME Int.is_between \- test if an int is in a range .SH LIBRARY @@ -35,3 +35,5 @@ assert (7).is_between(1, 10) == yes assert (7).is_between(100, 200) == no assert (7).is_between(1, 7) == yes .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.is_prime.3 b/man/man3/tomo-Int.is_prime.3 index d5adbac8..5dc2c826 100644 --- a/man/man3/tomo-Int.is_prime.3 +++ b/man/man3/tomo-Int.is_prime.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.is_prime 3 2025-09-21 "Tomo man-pages" +.TH Int.is_prime 3 2025-11-29 "Tomo man-pages" .SH NAME Int.is_prime \- check if an integer is prime .SH LIBRARY @@ -36,3 +36,5 @@ This function is _probabilistic_. With the default arguments, the chances of get assert (7).is_prime() == yes assert (6).is_prime() == no .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.next_prime.3 b/man/man3/tomo-Int.next_prime.3 index bac4e2ed..0afcf7e9 100644 --- a/man/man3/tomo-Int.next_prime.3 +++ b/man/man3/tomo-Int.next_prime.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.next_prime 3 2025-09-21 "Tomo man-pages" +.TH Int.next_prime 3 2025-11-29 "Tomo man-pages" .SH NAME Int.next_prime \- get the next prime .SH LIBRARY @@ -34,3 +34,5 @@ This function is _probabilistic_, but the chances of getting an incorrect answer .EX assert (11).next_prime() == 13 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.octal.3 b/man/man3/tomo-Int.octal.3 index 3cd4f7f6..627a2e9f 100644 --- a/man/man3/tomo-Int.octal.3 +++ b/man/man3/tomo-Int.octal.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.octal 3 2025-09-21 "Tomo man-pages" +.TH Int.octal 3 2025-11-29 "Tomo man-pages" .SH NAME Int.octal \- convert to octal .SH LIBRARY @@ -33,3 +33,5 @@ The octal string representation of the integer. .EX assert (64).octal(digits=4, prefix=yes) == "0o0100" .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.onward.3 b/man/man3/tomo-Int.onward.3 index 2b38014b..596cf842 100644 --- a/man/man3/tomo-Int.onward.3 +++ b/man/man3/tomo-Int.onward.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.onward 3 2025-09-21 "Tomo man-pages" +.TH Int.onward 3 2025-11-29 "Tomo man-pages" .SH NAME Int.onward \- iterate from a number onward .SH LIBRARY @@ -36,3 +36,5 @@ nums.insert(i) stop if i == 10 assert nums[] == [5, 6, 7, 8, 9, 10] .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.parse.3 b/man/man3/tomo-Int.parse.3 index 16793672..df3888db 100644 --- a/man/man3/tomo-Int.parse.3 +++ b/man/man3/tomo-Int.parse.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.parse 3 2025-09-21 "Tomo man-pages" +.TH Int.parse 3 2025-11-29 "Tomo man-pages" .SH NAME Int.parse \- convert text to integer .SH LIBRARY @@ -43,3 +43,5 @@ assert Int.parse("asdf") == none # Outside valid range: assert Int8.parse("9999999") == none .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.prev_prime.3 b/man/man3/tomo-Int.prev_prime.3 index 3391de4e..6908f408 100644 --- a/man/man3/tomo-Int.prev_prime.3 +++ b/man/man3/tomo-Int.prev_prime.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.prev_prime 3 2025-09-21 "Tomo man-pages" +.TH Int.prev_prime 3 2025-11-29 "Tomo man-pages" .SH NAME Int.prev_prime \- get the previous prime .SH LIBRARY @@ -34,3 +34,5 @@ This function is _probabilistic_, but the chances of getting an incorrect answer .EX assert (11).prev_prime() == 7 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.sqrt.3 b/man/man3/tomo-Int.sqrt.3 index a2a66a09..f929a5fd 100644 --- a/man/man3/tomo-Int.sqrt.3 +++ b/man/man3/tomo-Int.sqrt.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.sqrt 3 2025-09-21 "Tomo man-pages" +.TH Int.sqrt 3 2025-11-29 "Tomo man-pages" .SH NAME Int.sqrt \- square root .SH LIBRARY @@ -32,3 +32,5 @@ The integer part of the square root of `x`. assert (16).sqrt() == 4 assert (17).sqrt() == 4 .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-Int.to.3 b/man/man3/tomo-Int.to.3 index ea8112bc..9c0fe4dc 100644 --- a/man/man3/tomo-Int.to.3 +++ b/man/man3/tomo-Int.to.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Int.to 3 2025-09-21 "Tomo man-pages" +.TH Int.to 3 2025-11-29 "Tomo man-pages" .SH NAME Int.to \- iterate a range of integers .SH LIBRARY @@ -24,7 +24,7 @@ l l l l. Name Type Description Default first Int The starting value of the range. - last Int The ending value of the range. - -step Int? An optional step size to use. If unspecified or `none`, the step will be inferred to be `+1` if `last >= first`, otherwise `-1`. none +step Int? An optional step size to use. If unspecified or \fBnone\fR, the step will be inferred to be \fB+1\fR if \fBlast >= first\fR, otherwise \fB-1\fR. none .TE .SH RETURN An iterator function that returns each integer in the given range (inclusive). @@ -42,3 +42,5 @@ assert [x for x in (2).to(5)] == [2, 3, 4, 5] assert [x for x in (5).to(2)] == [5, 4, 3, 2] assert [x for x in (2).to(5, step=2)] == [2, 4] .EE +.SH SEE ALSO +.BR Tomo-Int (3) diff --git a/man/man3/tomo-List.3 b/man/man3/tomo-List.3 new file mode 100644 index 00000000..5ff85015 --- /dev/null +++ b/man/man3/tomo-List.3 @@ -0,0 +1,219 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH List 3 2025-11-29 "Tomo man-pages" +.SH NAME +List \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI List.binary_search\ :\ func(list:\ [T],\ by:\ func(x,y:&T->Int32)\ =\ T.compare\ ->\ Int) +Performs a binary search on a sorted list. + +For more, see: +.BR Tomo-List.binary_search (3) + + +.TP +.BI List.by\ :\ func(list:\ [T],\ step:\ Int\ ->\ [T]) +Creates a new list with elements spaced by the specified step value. + +For more, see: +.BR Tomo-List.by (3) + + +.TP +.BI List.clear\ :\ func(list:\ @[T]\ ->\ Void) +Clears all elements from the list. + +For more, see: +.BR Tomo-List.clear (3) + + +.TP +.BI List.counts\ :\ func(list:\ [T]\ ->\ {T=Int}) +Counts the occurrences of each element in the list. + +For more, see: +.BR Tomo-List.counts (3) + + +.TP +.BI List.find\ :\ func(list:\ [T],\ target:\ T\ ->\ Int?) +Finds the index of the first occurrence of an element (if any). + +For more, see: +.BR Tomo-List.find (3) + + +.TP +.BI List.from\ :\ func(list:\ [T],\ first:\ Int\ ->\ [T]) +Returns a slice of the list starting from a specified index. + +For more, see: +.BR Tomo-List.from (3) + + +.TP +.BI List.has\ :\ func(list:\ [T],\ target:\ T\ ->\ Bool) +Checks if the list has an element. + +For more, see: +.BR Tomo-List.has (3) + + +.TP +.BI List.heap_pop\ :\ func(list:\ @[T],\ by:\ func(x,y:&T->Int32)\ =\ T.compare\ ->\ T?) +Removes and returns the top element of a heap or \fBnone\fR if the list is empty. By default, this is the *minimum* value in the heap. + +For more, see: +.BR Tomo-List.heap_pop (3) + + +.TP +.BI List.heap_push\ :\ func(list:\ @[T],\ item:\ T,\ by\ =\ T.compare\ ->\ Void) +Adds an element to the heap and maintains the heap property. By default, this is a *minimum* heap. + +For more, see: +.BR Tomo-List.heap_push (3) + + +.TP +.BI List.heapify\ :\ func(list:\ @[T],\ by:\ func(x,y:&T->Int32)\ =\ T.compare\ ->\ Void) +Converts a list into a heap. + +For more, see: +.BR Tomo-List.heapify (3) + + +.TP +.BI List.insert\ :\ func(list:\ @[T],\ item:\ T,\ at:\ Int\ =\ 0\ ->\ Void) +Inserts an element at a specified position in the list. + +For more, see: +.BR Tomo-List.insert (3) + + +.TP +.BI List.insert_all\ :\ func(list:\ @[T],\ items:\ [T],\ at:\ Int\ =\ 0\ ->\ Void) +Inserts a list of items at a specified position in the list. + +For more, see: +.BR Tomo-List.insert_all (3) + + +.TP +.BI List.pop\ :\ func(list:\ &[T],\ index:\ Int\ =\ -1\ ->\ T?) +Removes and returns an item from the list. If the given index is present in the list, the item at that index will be removed and the list will become one element shorter. + +For more, see: +.BR Tomo-List.pop (3) + + +.TP +.BI List.random\ :\ func(list:\ [T],\ random:\ func(min,max:Int64->Int64)?\ =\ none\ ->\ T) +Selects a random element from the list. + +For more, see: +.BR Tomo-List.random (3) + + +.TP +.BI List.remove_at\ :\ func(list:\ @[T],\ at:\ Int\ =\ -1,\ count:\ Int\ =\ 1\ ->\ Void) +Removes elements from the list starting at a specified index. + +For more, see: +.BR Tomo-List.remove_at (3) + + +.TP +.BI List.remove_item\ :\ func(list:\ @[T],\ item:\ T,\ max_count:\ Int\ =\ -1\ ->\ Void) +Removes all occurrences of a specified item from the list. + +For more, see: +.BR Tomo-List.remove_item (3) + + +.TP +.BI List.reversed\ :\ func(list:\ [T]\ ->\ [T]) +Returns a reversed slice of the list. + +For more, see: +.BR Tomo-List.reversed (3) + + +.TP +.BI List.sample\ :\ func(list:\ [T],\ count:\ Int,\ weights:\ [Num]?\ =\ none,\ random:\ func(->Num)?\ =\ none\ ->\ [T]) +Selects a sample of elements from the list, optionally with weighted probabilities. + +For more, see: +.BR Tomo-List.sample (3) + + +.TP +.BI List.shuffle\ :\ func(list:\ @[T],\ random:\ func(min,max:Int64->Int64)?\ =\ none\ ->\ Void) +Shuffles the elements of the list in place. + +For more, see: +.BR Tomo-List.shuffle (3) + + +.TP +.BI List.shuffled\ :\ func(list:\ [T],\ random:\ func(min,max:Int64->Int64)?\ =\ none\ ->\ [T]) +Creates a new list with elements shuffled. + +For more, see: +.BR Tomo-List.shuffled (3) + + +.TP +.BI List.slice\ :\ func(list:\ [T],\ from:\ Int,\ to:\ Int\ ->\ [T]) +Returns a slice of the list spanning the given indices (inclusive). + +For more, see: +.BR Tomo-List.slice (3) + + +.TP +.BI List.sort\ :\ func(list:\ @[T],\ by\ =\ T.compare\ ->\ Void) +Sorts the elements of the list in place in ascending order (small to large). + +For more, see: +.BR Tomo-List.sort (3) + + +.TP +.BI List.sorted\ :\ func(list:\ [T],\ by\ =\ T.compare\ ->\ [T]) +Creates a new list with elements sorted. + +For more, see: +.BR Tomo-List.sorted (3) + + +.TP +.BI List.to\ :\ func(list:\ [T],\ last:\ Int\ ->\ [T]) +Returns a slice of the list from the start of the original list up to a specified index (inclusive). + +For more, see: +.BR Tomo-List.to (3) + + +.TP +.BI List.unique\ :\ func(list:\ [T]\ ->\ {T}) +Returns a set of the unique elements of the list. + +For more, see: +.BR Tomo-List.unique (3) + + +.TP +.BI List.where\ :\ func(list:\ [T],\ predicate:\ func(item:&T\ ->\ Bool)\ ->\ Int) +Find the index of the first item that matches a predicate function (if any). + +For more, see: +.BR Tomo-List.where (3) + diff --git a/man/man3/tomo-List.binary_search.3 b/man/man3/tomo-List.binary_search.3 index b2cb1759..ca92602d 100644 --- a/man/man3/tomo-List.binary_search.3 +++ b/man/man3/tomo-List.binary_search.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.binary_search 3 2025-09-21 "Tomo man-pages" +.TH List.binary_search 3 2025-11-29 "Tomo man-pages" .SH NAME List.binary_search \- binary search .SH LIBRARY @@ -34,3 +34,5 @@ assert [1, 3, 5, 7, 9].binary_search(5) == 3 assert [1, 3, 5, 7, 9].binary_search(-999) == 1 assert [1, 3, 5, 7, 9].binary_search(999) == 6 .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.by.3 b/man/man3/tomo-List.by.3 index 4d201c43..5f114df8 100644 --- a/man/man3/tomo-List.by.3 +++ b/man/man3/tomo-List.by.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.by 3 2025-09-21 "Tomo man-pages" +.TH List.by 3 2025-11-29 "Tomo man-pages" .SH NAME List.by \- slice by a step value .SH LIBRARY @@ -32,3 +32,5 @@ A new list with every `step`-th element from the original list. .EX assert [1, 2, 3, 4, 5, 6].by(2) == [1, 3, 5] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.clear.3 b/man/man3/tomo-List.clear.3 index bece5524..0f767272 100644 --- a/man/man3/tomo-List.clear.3 +++ b/man/man3/tomo-List.clear.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.clear 3 2025-10-11 "Tomo man-pages" +.TH List.clear 3 2025-11-29 "Tomo man-pages" .SH NAME List.clear \- clear a list .SH LIBRARY @@ -31,3 +31,5 @@ Nothing. .EX my_list.clear() .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.counts.3 b/man/man3/tomo-List.counts.3 index 5b6d9b1b..c4e22303 100644 --- a/man/man3/tomo-List.counts.3 +++ b/man/man3/tomo-List.counts.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.counts 3 2025-09-21 "Tomo man-pages" +.TH List.counts 3 2025-11-29 "Tomo man-pages" .SH NAME List.counts \- count occurrences .SH LIBRARY @@ -31,3 +31,5 @@ A table mapping each element to its count. .EX assert [10, 20, 30, 30, 30].counts() == {10=1, 20=1, 30=3} .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.find.3 b/man/man3/tomo-List.find.3 index 65ae5926..1eef0bb2 100644 --- a/man/man3/tomo-List.find.3 +++ b/man/man3/tomo-List.find.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.find 3 2025-09-21 "Tomo man-pages" +.TH List.find 3 2025-11-29 "Tomo man-pages" .SH NAME List.find \- find an element's index .SH LIBRARY @@ -33,3 +33,5 @@ The index of the first occurrence or `none` if not found. assert [10, 20, 30, 40, 50].find(20) == 2 assert [10, 20, 30, 40, 50].find(9999) == none .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.from.3 b/man/man3/tomo-List.from.3 index a7a24cd6..f58e669e 100644 --- a/man/man3/tomo-List.from.3 +++ b/man/man3/tomo-List.from.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.from 3 2025-09-21 "Tomo man-pages" +.TH List.from 3 2025-11-29 "Tomo man-pages" .SH NAME List.from \- slice an array from a start index .SH LIBRARY @@ -32,3 +32,5 @@ A new list starting from the specified index. .EX assert [10, 20, 30, 40, 50].from(3) == [30, 40, 50] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.has.3 b/man/man3/tomo-List.has.3 index 96507253..75eb5bc8 100644 --- a/man/man3/tomo-List.has.3 +++ b/man/man3/tomo-List.has.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.has 3 2025-09-21 "Tomo man-pages" +.TH List.has 3 2025-11-29 "Tomo man-pages" .SH NAME List.has \- check for member .SH LIBRARY @@ -32,3 +32,5 @@ target T The element to check for. - .EX assert [10, 20, 30].has(20) == yes .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.heap_pop.3 b/man/man3/tomo-List.heap_pop.3 index cd4e292a..2d6621ee 100644 --- a/man/man3/tomo-List.heap_pop.3 +++ b/man/man3/tomo-List.heap_pop.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.heap_pop 3 2025-09-21 "Tomo man-pages" +.TH List.heap_pop 3 2025-11-29 "Tomo man-pages" .SH NAME List.heap_pop \- heap pop .SH LIBRARY @@ -34,3 +34,5 @@ my_heap := [30, 10, 20] my_heap.heapify() assert my_heap.heap_pop() == 10 .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.heap_push.3 b/man/man3/tomo-List.heap_push.3 index 3c1804bd..108e9007 100644 --- a/man/man3/tomo-List.heap_push.3 +++ b/man/man3/tomo-List.heap_push.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.heap_push 3 2025-10-11 "Tomo man-pages" +.TH List.heap_push 3 2025-11-29 "Tomo man-pages" .SH NAME List.heap_push \- heap push .SH LIBRARY @@ -33,3 +33,5 @@ Nothing. .EX my_heap.heap_push(10) .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.heapify.3 b/man/man3/tomo-List.heapify.3 index 345a47b9..5f7f47c9 100644 --- a/man/man3/tomo-List.heapify.3 +++ b/man/man3/tomo-List.heapify.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.heapify 3 2025-10-11 "Tomo man-pages" +.TH List.heapify 3 2025-11-29 "Tomo man-pages" .SH NAME List.heapify \- convert a list into a heap .SH LIBRARY @@ -33,3 +33,5 @@ Nothing. my_heap := [30, 10, 20] my_heap.heapify() .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.insert.3 b/man/man3/tomo-List.insert.3 index 0ab71a3f..f885c1eb 100644 --- a/man/man3/tomo-List.insert.3 +++ b/man/man3/tomo-List.insert.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.insert 3 2025-09-21 "Tomo man-pages" +.TH List.insert 3 2025-11-29 "Tomo man-pages" .SH NAME List.insert \- add an item to a list .SH LIBRARY @@ -41,3 +41,5 @@ assert list == [10, 20, 30] list.insert(999, at=2) assert list == [10, 999, 20, 30] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.insert_all.3 b/man/man3/tomo-List.insert_all.3 index 795f4a2d..145ccd5b 100644 --- a/man/man3/tomo-List.insert_all.3 +++ b/man/man3/tomo-List.insert_all.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.insert_all 3 2025-09-21 "Tomo man-pages" +.TH List.insert_all 3 2025-11-29 "Tomo man-pages" .SH NAME List.insert_all \- add multiple items to a list .SH LIBRARY @@ -41,3 +41,5 @@ assert list == [10, 20, 30, 40] list.insert_all([99, 100], at=2) assert list == [10, 99, 100, 20, 30, 40] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.pop.3 b/man/man3/tomo-List.pop.3 index b157e0ac..aabe249d 100644 --- a/man/man3/tomo-List.pop.3 +++ b/man/man3/tomo-List.pop.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.pop 3 2025-09-21 "Tomo man-pages" +.TH List.pop 3 2025-11-29 "Tomo man-pages" .SH NAME List.pop \- pop an item from a list .SH LIBRARY @@ -41,3 +41,5 @@ assert list[] == [10, 20, 30] assert list.pop(index=2) == 20 assert list[] == [10, 30] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.random.3 b/man/man3/tomo-List.random.3 index 0c82bfd0..55702485 100644 --- a/man/man3/tomo-List.random.3 +++ b/man/man3/tomo-List.random.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.random 3 2025-09-21 "Tomo man-pages" +.TH List.random 3 2025-11-29 "Tomo man-pages" .SH NAME List.random \- pick a random element .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default list [T] The list from which to select a random element. - -random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between `min` and `max` (inclusive). (Used for deterministic pseudorandom number generation) none +random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between \fBmin\fR and \fBmax\fR (inclusive). (Used for deterministic pseudorandom number generation) none .TE .SH RETURN A random element from the list. @@ -32,3 +32,5 @@ A random element from the list. .EX assert [10, 20, 30].random() == 20 .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.remove_at.3 b/man/man3/tomo-List.remove_at.3 index 8e993931..f0695836 100644 --- a/man/man3/tomo-List.remove_at.3 +++ b/man/man3/tomo-List.remove_at.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.remove_at 3 2025-09-21 "Tomo man-pages" +.TH List.remove_at 3 2025-11-29 "Tomo man-pages" .SH NAME List.remove_at \- remove an item by index .SH LIBRARY @@ -41,3 +41,5 @@ assert list == [10, 30, 40, 50] list.remove_at(2, count=2) assert list == [10, 50] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.remove_item.3 b/man/man3/tomo-List.remove_item.3 index 02631ba6..12662797 100644 --- a/man/man3/tomo-List.remove_item.3 +++ b/man/man3/tomo-List.remove_item.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.remove_item 3 2025-09-21 "Tomo man-pages" +.TH List.remove_item 3 2025-11-29 "Tomo man-pages" .SH NAME List.remove_item \- remove an item by value .SH LIBRARY @@ -41,3 +41,5 @@ assert list == [20, 20, 30] list.remove_item(20, max_count=1) assert list == [20, 30] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.reversed.3 b/man/man3/tomo-List.reversed.3 index 2b84e333..b49d82a9 100644 --- a/man/man3/tomo-List.reversed.3 +++ b/man/man3/tomo-List.reversed.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.reversed 3 2025-09-21 "Tomo man-pages" +.TH List.reversed 3 2025-11-29 "Tomo man-pages" .SH NAME List.reversed \- get a reversed list .SH LIBRARY @@ -31,3 +31,5 @@ A slice of the list with elements in reverse order. .EX assert [10, 20, 30].reversed() == [30, 20, 10] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.sample.3 b/man/man3/tomo-List.sample.3 index 0e4d779c..29ad8563 100644 --- a/man/man3/tomo-List.sample.3 +++ b/man/man3/tomo-List.sample.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.sample 3 2025-09-21 "Tomo man-pages" +.TH List.sample 3 2025-11-29 "Tomo man-pages" .SH NAME List.sample \- weighted random choices .SH LIBRARY @@ -25,7 +25,7 @@ Name Type Description Default list [T] The list to sample from. - count Int The number of elements to sample. - weights [Num]? The probability weights for each element in the list. These values do not need to add up to any particular number, they are relative weights. If no weights are given, elements will be sampled with uniform probability. none -random func(->Num)? If provided, this function will be used to get random values for sampling the list. The provided function should return random numbers between `0.0` (inclusive) and `1.0` (exclusive). (Used for deterministic pseudorandom number generation) none +random func(->Num)? If provided, this function will be used to get random values for sampling the list. The provided function should return random numbers between \fB0.0\fR (inclusive) and \fB1.0\fR (exclusive). (Used for deterministic pseudorandom number generation) none .TE .SH RETURN A list of sampled elements from the list. @@ -37,3 +37,5 @@ Errors will be raised if any of the following conditions occurs: - The given lis .EX assert [10, 20, 30].sample(2, weights=[90%, 5%, 5%]) == [10, 10] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.shuffle.3 b/man/man3/tomo-List.shuffle.3 index 875a73c6..112bf88d 100644 --- a/man/man3/tomo-List.shuffle.3 +++ b/man/man3/tomo-List.shuffle.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.shuffle 3 2025-10-11 "Tomo man-pages" +.TH List.shuffle 3 2025-11-29 "Tomo man-pages" .SH NAME List.shuffle \- shuffle a list in place .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default list @[T] The mutable reference to the list to be shuffled. - -random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between `min` and `max` (inclusive). (Used for deterministic pseudorandom number generation) none +random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between \fBmin\fR and \fBmax\fR (inclusive). (Used for deterministic pseudorandom number generation) none .TE .SH RETURN Nothing. @@ -32,3 +32,5 @@ Nothing. .EX list.shuffle() .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.shuffled.3 b/man/man3/tomo-List.shuffled.3 index 25e63154..98fef55f 100644 --- a/man/man3/tomo-List.shuffled.3 +++ b/man/man3/tomo-List.shuffled.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.shuffled 3 2025-09-21 "Tomo man-pages" +.TH List.shuffled 3 2025-11-29 "Tomo man-pages" .SH NAME List.shuffled \- return a shuffled list .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default list [T] The list to be shuffled. - -random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between `min` and `max` (inclusive). (Used for deterministic pseudorandom number generation) none +random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between \fBmin\fR and \fBmax\fR (inclusive). (Used for deterministic pseudorandom number generation) none .TE .SH RETURN A new list with shuffled elements. @@ -32,3 +32,5 @@ A new list with shuffled elements. .EX assert [10, 20, 30, 40].shuffled() == [40, 10, 30, 20] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.slice.3 b/man/man3/tomo-List.slice.3 index 676e2a08..d160c863 100644 --- a/man/man3/tomo-List.slice.3 +++ b/man/man3/tomo-List.slice.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.slice 3 2025-09-21 "Tomo man-pages" +.TH List.slice 3 2025-11-29 "Tomo man-pages" .SH NAME List.slice \- get a slice of a list .SH LIBRARY @@ -34,3 +34,5 @@ A new list spanning the given indices. Note: negative indices are counted from t assert [10, 20, 30, 40, 50].slice(2, 4) == [20, 30, 40] assert [10, 20, 30, 40, 50].slice(-3, -2) == [30, 40] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.sort.3 b/man/man3/tomo-List.sort.3 index 3957e9fe..3e93c86e 100644 --- a/man/man3/tomo-List.sort.3 +++ b/man/man3/tomo-List.sort.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.sort 3 2025-09-21 "Tomo man-pages" +.TH List.sort 3 2025-11-29 "Tomo man-pages" .SH NAME List.sort \- sort a list .SH LIBRARY @@ -37,3 +37,5 @@ assert list == [-30, 10, 20, 40] list.sort(func(a,b:&Int): a.abs() <> b.abs()) assert list == [10, 20, -30, 40] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.sorted.3 b/man/man3/tomo-List.sorted.3 index 49d75ecd..f6fe93a4 100644 --- a/man/man3/tomo-List.sorted.3 +++ b/man/man3/tomo-List.sorted.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.sorted 3 2025-09-21 "Tomo man-pages" +.TH List.sorted 3 2025-11-29 "Tomo man-pages" .SH NAME List.sorted \- sorted copy of a list .SH LIBRARY @@ -35,3 +35,5 @@ assert [40, 10, -30, 20].sorted( func(a,b:&Int): a.abs() <> b.abs() ) == [10, 20, -30, 40] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.to.3 b/man/man3/tomo-List.to.3 index 5af2a6db..dd1a23a9 100644 --- a/man/man3/tomo-List.to.3 +++ b/man/man3/tomo-List.to.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.to 3 2025-09-21 "Tomo man-pages" +.TH List.to 3 2025-11-29 "Tomo man-pages" .SH NAME List.to \- slice a list to an end index .SH LIBRARY @@ -33,3 +33,5 @@ A new list containing elements from the start up to the specified index. assert [10, 20, 30, 40, 50].to(3) == [10, 20, 30] assert [10, 20, 30, 40, 50].to(-2) == [10, 20, 30, 40] .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.unique.3 b/man/man3/tomo-List.unique.3 index 9ed81687..1c203a62 100644 --- a/man/man3/tomo-List.unique.3 +++ b/man/man3/tomo-List.unique.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.unique 3 2025-10-11 "Tomo man-pages" +.TH List.unique 3 2025-11-29 "Tomo man-pages" .SH NAME List.unique \- get the unique items in a list .SH LIBRARY @@ -31,3 +31,5 @@ A set of the unique elements from the list. .EX assert [10, 20, 10, 10, 30].unique() == {10, 20, 30} .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-List.where.3 b/man/man3/tomo-List.where.3 index 8d5c71ef..a436d2ea 100644 --- a/man/man3/tomo-List.where.3 +++ b/man/man3/tomo-List.where.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH List.where 3 2025-09-21 "Tomo man-pages" +.TH List.where 3 2025-11-29 "Tomo man-pages" .SH NAME List.where \- find an index where a predicate matches .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default list [T] The list to search through. - -predicate func(item:&T -> Bool) A function that returns `yes` if the item's index should be returned or `no` if it should not. - +predicate func(item:&T -> Bool) A function that returns \fByes\fR if the item's index should be returned or \fBno\fR if it should not. - .TE .SH RETURN Returns the index of the first item where the predicate is true or `none` if no item matches. @@ -33,3 +33,5 @@ Returns the index of the first item where the predicate is true or `none` if no assert [4, 5, 6].where(func(i:&Int): i.is_prime()) == 5 assert [4, 6, 8].find(func(i:&Int): i.is_prime()) == none .EE +.SH SEE ALSO +.BR Tomo-List (3) diff --git a/man/man3/tomo-Num.1_PI.3 b/man/man3/tomo-Num.1_PI.3 index ad91d33b..75245ad4 100644 --- a/man/man3/tomo-Num.1_PI.3 +++ b/man/man3/tomo-Num.1_PI.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.1_PI 3 2025-04-30 "Tomo man-pages" +.TH Num.1_PI 3 2025-11-29 "Tomo man-pages" .SH NAME Num.1_PI \- 1/pi .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The constant $\frac{1}{\pi}$. +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.2_PI.3 b/man/man3/tomo-Num.2_PI.3 index 3e7db63b..9ea37335 100644 --- a/man/man3/tomo-Num.2_PI.3 +++ b/man/man3/tomo-Num.2_PI.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.2_PI 3 2025-04-30 "Tomo man-pages" +.TH Num.2_PI 3 2025-11-29 "Tomo man-pages" .SH NAME Num.2_PI \- 2*pi .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The constant $2 \times \pi$. +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.2_SQRTPI.3 b/man/man3/tomo-Num.2_SQRTPI.3 index 15a19bc2..aab8577a 100644 --- a/man/man3/tomo-Num.2_SQRTPI.3 +++ b/man/man3/tomo-Num.2_SQRTPI.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.2_SQRTPI 3 2025-04-30 "Tomo man-pages" +.TH Num.2_SQRTPI 3 2025-11-29 "Tomo man-pages" .SH NAME Num.2_SQRTPI \- 2*sqrt(pi) .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The constant $2 \times \sqrt{\pi}$. +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.3 b/man/man3/tomo-Num.3 new file mode 100644 index 00000000..99c9e8d5 --- /dev/null +++ b/man/man3/tomo-Num.3 @@ -0,0 +1,523 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Num 3 2025-11-29 "Tomo man-pages" +.SH NAME +Num \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Num.1_PI\ :\ Num +The constant $\frac{1}{\pi}$. + +For more, see: +.BR Tomo-Num.1_PI (3) + + +.TP +.BI Num.2_PI\ :\ Num +The constant $2 \times \pi$. + +For more, see: +.BR Tomo-Num.2_PI (3) + + +.TP +.BI Num.2_SQRTPI\ :\ Num +The constant $2 \times \sqrt{\pi}$. + +For more, see: +.BR Tomo-Num.2_SQRTPI (3) + + +.TP +.BI Num.E\ :\ Num +The base of the natural logarithm ($e$). + +For more, see: +.BR Tomo-Num.E (3) + + +.TP +.BI Num.INF\ :\ Num +Positive infinity. + +For more, see: +.BR Tomo-Num.INF (3) + + +.TP +.BI Num.LN10\ :\ Num +The natural logarithm of 10. + +For more, see: +.BR Tomo-Num.LN10 (3) + + +.TP +.BI Num.LN2\ :\ Num +The natural logarithm of 2. + +For more, see: +.BR Tomo-Num.LN2 (3) + + +.TP +.BI Num.LOG2E\ :\ Num +The base 2 logarithm of $e$ + +For more, see: +.BR Tomo-Num.LOG2E (3) + + +.TP +.BI Num.PI\ :\ Num +Pi ($\pi$). + +For more, see: +.BR Tomo-Num.PI (3) + + +.TP +.BI Num.PI_2\ :\ Num +$\frac{\pi}{2}$ + +For more, see: +.BR Tomo-Num.PI_2 (3) + + +.TP +.BI Num.PI_4\ :\ Num +$\frac{\pi}{4}$ + +For more, see: +.BR Tomo-Num.PI_4 (3) + + +.TP +.BI Num.SQRT1_2\ :\ Num +$\sqrt{\frac{1}{2}}$ + +For more, see: +.BR Tomo-Num.SQRT1_2 (3) + + +.TP +.BI Num.SQRT2\ :\ Num +$\sqrt{2}$ + +For more, see: +.BR Tomo-Num.SQRT2 (3) + + +.TP +.BI Num.TAU\ :\ Num +Tau ($2 \times \pi$) + +For more, see: +.BR Tomo-Num.TAU (3) + + +.TP +.BI Num.abs\ :\ func(n:\ Num\ ->\ Num) +Calculates the absolute value of a number. + +For more, see: +.BR Tomo-Num.abs (3) + + +.TP +.BI Num.acos\ :\ func(x:\ Num\ ->\ Num) +Computes the arc cosine of a number. + +For more, see: +.BR Tomo-Num.acos (3) + + +.TP +.BI Num.acosh\ :\ func(x:\ Num\ ->\ Num) +Computes the inverse hyperbolic cosine of a number. + +For more, see: +.BR Tomo-Num.acosh (3) + + +.TP +.BI Num.asin\ :\ func(x:\ Num\ ->\ Num) +Computes the arc sine of a number. + +For more, see: +.BR Tomo-Num.asin (3) + + +.TP +.BI Num.asinh\ :\ func(x:\ Num\ ->\ Num) +Computes the inverse hyperbolic sine of a number. + +For more, see: +.BR Tomo-Num.asinh (3) + + +.TP +.BI Num.atan\ :\ func(x:\ Num\ ->\ Num) +Computes the arc tangent of a number. + +For more, see: +.BR Tomo-Num.atan (3) + + +.TP +.BI Num.atan2\ :\ func(x:\ Num,\ y:\ Num\ ->\ Num) +Computes the arc tangent of the quotient of two numbers. + +For more, see: +.BR Tomo-Num.atan2 (3) + + +.TP +.BI Num.atanh\ :\ func(x:\ Num\ ->\ Num) +Computes the inverse hyperbolic tangent of a number. + +For more, see: +.BR Tomo-Num.atanh (3) + + +.TP +.BI Num.cbrt\ :\ func(x:\ Num\ ->\ Num) +Computes the cube root of a number. + +For more, see: +.BR Tomo-Num.cbrt (3) + + +.TP +.BI Num.ceil\ :\ func(x:\ Num\ ->\ Num) +Rounds a number up to the nearest integer. + +For more, see: +.BR Tomo-Num.ceil (3) + + +.TP +.BI Num.clamped\ :\ func(x:\ Num,\ low:\ Num,\ high:\ Num\ ->\ Num) +Returns the given number clamped between two values so that it is within that range. + +For more, see: +.BR Tomo-Num.clamped (3) + + +.TP +.BI Num.copysign\ :\ func(x:\ Num,\ y:\ Num\ ->\ Num) +Copies the sign of one number to another. + +For more, see: +.BR Tomo-Num.copysign (3) + + +.TP +.BI Num.cos\ :\ func(x:\ Num\ ->\ Num) +Computes the cosine of a number (angle in radians). + +For more, see: +.BR Tomo-Num.cos (3) + + +.TP +.BI Num.cosh\ :\ func(x:\ Num\ ->\ Num) +Computes the hyperbolic cosine of a number. + +For more, see: +.BR Tomo-Num.cosh (3) + + +.TP +.BI Num.erf\ :\ func(x:\ Num\ ->\ Num) +Computes the error function of a number. + +For more, see: +.BR Tomo-Num.erf (3) + + +.TP +.BI Num.erfc\ :\ func(x:\ Num\ ->\ Num) +Computes the complementary error function of a number. + +For more, see: +.BR Tomo-Num.erfc (3) + + +.TP +.BI Num.exp\ :\ func(x:\ Num\ ->\ Num) +Computes the exponential function $e^x$ for a number. + +For more, see: +.BR Tomo-Num.exp (3) + + +.TP +.BI Num.exp2\ :\ func(x:\ Num\ ->\ Num) +Computes $2^x$ for a number. + +For more, see: +.BR Tomo-Num.exp2 (3) + + +.TP +.BI Num.expm1\ :\ func(x:\ Num\ ->\ Num) +Computes $e^x - 1$ for a number. + +For more, see: +.BR Tomo-Num.expm1 (3) + + +.TP +.BI Num.fdim\ :\ func(x:\ Num,\ y:\ Num\ ->\ Num) +Computes the positive difference between two numbers. + +For more, see: +.BR Tomo-Num.fdim (3) + + +.TP +.BI Num.floor\ :\ func(x:\ Num\ ->\ Num) +Rounds a number down to the nearest integer. + +For more, see: +.BR Tomo-Num.floor (3) + + +.TP +.BI Num.hypot\ :\ func(x:\ Num,\ y:\ Num\ ->\ Num) +Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. + +For more, see: +.BR Tomo-Num.hypot (3) + + +.TP +.BI Num.is_between\ :\ func(x:\ Num,\ low:\ Num,\ high:\ Num\ ->\ Bool) +Determines if a number is between two numbers (inclusive). + +For more, see: +.BR Tomo-Num.is_between (3) + + +.TP +.BI Num.isfinite\ :\ func(n:\ Num\ ->\ Bool) +Checks if a number is finite. + +For more, see: +.BR Tomo-Num.isfinite (3) + + +.TP +.BI Num.isinf\ :\ func(n:\ Num\ ->\ Bool) +Checks if a number is infinite. + +For more, see: +.BR Tomo-Num.isinf (3) + + +.TP +.BI Num.j0\ :\ func(x:\ Num\ ->\ Num) +Computes the Bessel function of the first kind of order 0. + +For more, see: +.BR Tomo-Num.j0 (3) + + +.TP +.BI Num.j1\ :\ func(x:\ Num\ ->\ Num) +Computes the Bessel function of the first kind of order 1. + +For more, see: +.BR Tomo-Num.j1 (3) + + +.TP +.BI Num.log\ :\ func(x:\ Num\ ->\ Num) +Computes the natural logarithm (base $e$) of a number. + +For more, see: +.BR Tomo-Num.log (3) + + +.TP +.BI Num.log10\ :\ func(x:\ Num\ ->\ Num) +Computes the base-10 logarithm of a number. + +For more, see: +.BR Tomo-Num.log10 (3) + + +.TP +.BI Num.log1p\ :\ func(x:\ Num\ ->\ Num) +Computes $\log(1 + x)$ for a number. + +For more, see: +.BR Tomo-Num.log1p (3) + + +.TP +.BI Num.log2\ :\ func(x:\ Num\ ->\ Num) +Computes the base-2 logarithm of a number. + +For more, see: +.BR Tomo-Num.log2 (3) + + +.TP +.BI Num.logb\ :\ func(x:\ Num\ ->\ Num) +Computes the binary exponent (base-2 logarithm) of a number. + +For more, see: +.BR Tomo-Num.logb (3) + + +.TP +.BI Num.mix\ :\ func(amount:\ Num,\ x:\ Num,\ y:\ Num\ ->\ Num) +Interpolates between two numbers based on a given amount. + +For more, see: +.BR Tomo-Num.mix (3) + + +.TP +.BI Num.near\ :\ func(x:\ Num,\ y:\ Num,\ ratio:\ Num\ =\ 1e-9,\ min_epsilon:\ Num\ =\ 1e-9\ ->\ Bool) +Checks if two numbers are approximately equal within specified tolerances. If two numbers are within an absolute difference or the ratio between the two is small enough, they are considered near each other. + +For more, see: +.BR Tomo-Num.near (3) + + +.TP +.BI Num.nextafter\ :\ func(x:\ Num,\ y:\ Num\ ->\ Num) +Computes the next representable value after a given number towards a specified direction. + +For more, see: +.BR Tomo-Num.nextafter (3) + + +.TP +.BI Num.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Num?) +Converts a text representation of a number into a floating-point number. + +For more, see: +.BR Tomo-Num.parse (3) + + +.TP +.BI Num.percent\ :\ func(n:\ Num,\ precision:\ Num\ =\ 0.01\ ->\ Text) +Convert a number into a percentage text with a percent sign. + +For more, see: +.BR Tomo-Num.percent (3) + + +.TP +.BI Num.rint\ :\ func(x:\ Num\ ->\ Num) +Rounds a number to the nearest integer, with ties rounded to the nearest even integer. + +For more, see: +.BR Tomo-Num.rint (3) + + +.TP +.BI Num.round\ :\ func(x:\ Num\ ->\ Num) +Rounds a number to the nearest whole number integer. + +For more, see: +.BR Tomo-Num.round (3) + + +.TP +.BI Num.significand\ :\ func(x:\ Num\ ->\ Num) +Extracts the significand (or mantissa) of a number. + +For more, see: +.BR Tomo-Num.significand (3) + + +.TP +.BI Num.sin\ :\ func(x:\ Num\ ->\ Num) +Computes the sine of a number (angle in radians). + +For more, see: +.BR Tomo-Num.sin (3) + + +.TP +.BI Num.sinh\ :\ func(x:\ Num\ ->\ Num) +Computes the hyperbolic sine of a number. + +For more, see: +.BR Tomo-Num.sinh (3) + + +.TP +.BI Num.sqrt\ :\ func(x:\ Num\ ->\ Num) +Computes the square root of a number. + +For more, see: +.BR Tomo-Num.sqrt (3) + + +.TP +.BI Num.tan\ :\ func(x:\ Num\ ->\ Num) +Computes the tangent of a number (angle in radians). + +For more, see: +.BR Tomo-Num.tan (3) + + +.TP +.BI Num.tanh\ :\ func(x:\ Num\ ->\ Num) +Computes the hyperbolic tangent of a number. + +For more, see: +.BR Tomo-Num.tanh (3) + + +.TP +.BI Num.tgamma\ :\ func(x:\ Num\ ->\ Num) +Computes the gamma function of a number. + +For more, see: +.BR Tomo-Num.tgamma (3) + + +.TP +.BI Num.trunc\ :\ func(x:\ Num\ ->\ Num) +Truncates a number to the nearest integer towards zero. + +For more, see: +.BR Tomo-Num.trunc (3) + + +.TP +.BI Num.with_precision\ :\ func(n:\ Num,\ precision:\ Num\ ->\ Num) +Round a number to the given precision level (specified as \fB10\fR, \fB.1\fR, \fB.001\fR etc). + +For more, see: +.BR Tomo-Num.with_precision (3) + + +.TP +.BI Num.y0\ :\ func(x:\ Num\ ->\ Num) +Computes the Bessel function of the second kind of order 0. + +For more, see: +.BR Tomo-Num.y0 (3) + + +.TP +.BI Num.y1\ :\ func(x:\ Num\ ->\ Num) +Computes the Bessel function of the second kind of order 1. + +For more, see: +.BR Tomo-Num.y1 (3) + diff --git a/man/man3/tomo-Num.E.3 b/man/man3/tomo-Num.E.3 index 227c3a78..771c015a 100644 --- a/man/man3/tomo-Num.E.3 +++ b/man/man3/tomo-Num.E.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.E 3 2025-04-30 "Tomo man-pages" +.TH Num.E 3 2025-11-29 "Tomo man-pages" .SH NAME Num.E \- Euler's constant .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The base of the natural logarithm ($e$). +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.INF.3 b/man/man3/tomo-Num.INF.3 index 6b7560e8..364274e2 100644 --- a/man/man3/tomo-Num.INF.3 +++ b/man/man3/tomo-Num.INF.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.INF 3 2025-04-30 "Tomo man-pages" +.TH Num.INF 3 2025-11-29 "Tomo man-pages" .SH NAME Num.INF \- infinity .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library Positive infinity. +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.LN10.3 b/man/man3/tomo-Num.LN10.3 index 00383a60..25c9ea99 100644 --- a/man/man3/tomo-Num.LN10.3 +++ b/man/man3/tomo-Num.LN10.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.LN10 3 2025-04-30 "Tomo man-pages" +.TH Num.LN10 3 2025-11-29 "Tomo man-pages" .SH NAME Num.LN10 \- log(10) .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The natural logarithm of 10. +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.LN2.3 b/man/man3/tomo-Num.LN2.3 index 6e3d3df6..e91741df 100644 --- a/man/man3/tomo-Num.LN2.3 +++ b/man/man3/tomo-Num.LN2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.LN2 3 2025-04-30 "Tomo man-pages" +.TH Num.LN2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.LN2 \- log(2) .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The natural logarithm of 2. +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.LOG2E.3 b/man/man3/tomo-Num.LOG2E.3 index b729be0c..35f8abc5 100644 --- a/man/man3/tomo-Num.LOG2E.3 +++ b/man/man3/tomo-Num.LOG2E.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.LOG2E 3 2025-04-30 "Tomo man-pages" +.TH Num.LOG2E 3 2025-11-29 "Tomo man-pages" .SH NAME Num.LOG2E \- log_2(e) .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library The base 2 logarithm of $e$ +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.PI.3 b/man/man3/tomo-Num.PI.3 index 61d4a0f8..a3d3518a 100644 --- a/man/man3/tomo-Num.PI.3 +++ b/man/man3/tomo-Num.PI.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.PI 3 2025-04-30 "Tomo man-pages" +.TH Num.PI 3 2025-11-29 "Tomo man-pages" .SH NAME Num.PI \- pi .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library Pi ($\pi$). +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.PI_2.3 b/man/man3/tomo-Num.PI_2.3 index 93e7f4ca..6801a71c 100644 --- a/man/man3/tomo-Num.PI_2.3 +++ b/man/man3/tomo-Num.PI_2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.PI_2 3 2025-04-30 "Tomo man-pages" +.TH Num.PI_2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.PI_2 \- pi/2 .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library $\frac{\pi}{2}$ +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.PI_4.3 b/man/man3/tomo-Num.PI_4.3 index c6796704..e1a18648 100644 --- a/man/man3/tomo-Num.PI_4.3 +++ b/man/man3/tomo-Num.PI_4.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.PI_4 3 2025-04-30 "Tomo man-pages" +.TH Num.PI_4 3 2025-11-29 "Tomo man-pages" .SH NAME Num.PI_4 \- pi/4 .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library $\frac{\pi}{4}$ +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.SQRT1_2.3 b/man/man3/tomo-Num.SQRT1_2.3 index 0feac353..fc347716 100644 --- a/man/man3/tomo-Num.SQRT1_2.3 +++ b/man/man3/tomo-Num.SQRT1_2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.SQRT1_2 3 2025-04-30 "Tomo man-pages" +.TH Num.SQRT1_2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.SQRT1_2 \- sqrt(1/2) .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library $\sqrt{\frac{1}{2}}$ +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.SQRT2.3 b/man/man3/tomo-Num.SQRT2.3 index 75bd86bf..5b3bf304 100644 --- a/man/man3/tomo-Num.SQRT2.3 +++ b/man/man3/tomo-Num.SQRT2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.SQRT2 3 2025-04-30 "Tomo man-pages" +.TH Num.SQRT2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.SQRT2 \- sqrt(2) .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library $\sqrt{2}$ +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.TAU.3 b/man/man3/tomo-Num.TAU.3 index 2abc33d2..38d22030 100644 --- a/man/man3/tomo-Num.TAU.3 +++ b/man/man3/tomo-Num.TAU.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.TAU 3 2025-04-30 "Tomo man-pages" +.TH Num.TAU 3 2025-11-29 "Tomo man-pages" .SH NAME Num.TAU \- 2*pi .SH LIBRARY @@ -15,3 +15,5 @@ Tomo Standard Library Tau ($2 \times \pi$) +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.abs.3 b/man/man3/tomo-Num.abs.3 index 425d43cb..e34723f8 100644 --- a/man/man3/tomo-Num.abs.3 +++ b/man/man3/tomo-Num.abs.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.abs 3 2025-09-21 "Tomo man-pages" +.TH Num.abs 3 2025-11-29 "Tomo man-pages" .SH NAME Num.abs \- absolute value .SH LIBRARY @@ -31,3 +31,5 @@ The absolute value of `n`. .EX assert (-3.5).abs() == 3.5 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.acos.3 b/man/man3/tomo-Num.acos.3 index 819c43d3..8c007109 100644 --- a/man/man3/tomo-Num.acos.3 +++ b/man/man3/tomo-Num.acos.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.acos 3 2025-09-21 "Tomo man-pages" +.TH Num.acos 3 2025-11-29 "Tomo man-pages" .SH NAME Num.acos \- arc cosine .SH LIBRARY @@ -31,3 +31,5 @@ The arc cosine of `x` in radians. .EX assert (0.0).acos() == 1.5708 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.acosh.3 b/man/man3/tomo-Num.acosh.3 index 0899fff8..f2980b39 100644 --- a/man/man3/tomo-Num.acosh.3 +++ b/man/man3/tomo-Num.acosh.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.acosh 3 2025-09-21 "Tomo man-pages" +.TH Num.acosh 3 2025-11-29 "Tomo man-pages" .SH NAME Num.acosh \- arc hyperbolic cosine .SH LIBRARY @@ -31,3 +31,5 @@ The inverse hyperbolic cosine of `x`. .EX assert (1.0).acosh() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.asin.3 b/man/man3/tomo-Num.asin.3 index 529a974c..4501c81e 100644 --- a/man/man3/tomo-Num.asin.3 +++ b/man/man3/tomo-Num.asin.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.asin 3 2025-09-21 "Tomo man-pages" +.TH Num.asin 3 2025-11-29 "Tomo man-pages" .SH NAME Num.asin \- arc sine .SH LIBRARY @@ -31,3 +31,5 @@ The arc sine of `x` in radians. .EX assert (0.5).asin() == 0.5236 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.asinh.3 b/man/man3/tomo-Num.asinh.3 index da88b719..4c2216a8 100644 --- a/man/man3/tomo-Num.asinh.3 +++ b/man/man3/tomo-Num.asinh.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.asinh 3 2025-09-21 "Tomo man-pages" +.TH Num.asinh 3 2025-11-29 "Tomo man-pages" .SH NAME Num.asinh \- arc hyperbolic sine .SH LIBRARY @@ -31,3 +31,5 @@ The inverse hyperbolic sine of `x`. .EX assert (0.0).asinh() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.atan.3 b/man/man3/tomo-Num.atan.3 index 808338d4..28efbba5 100644 --- a/man/man3/tomo-Num.atan.3 +++ b/man/man3/tomo-Num.atan.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.atan 3 2025-09-21 "Tomo man-pages" +.TH Num.atan 3 2025-11-29 "Tomo man-pages" .SH NAME Num.atan \- arc tangent .SH LIBRARY @@ -31,3 +31,5 @@ The arc tangent of `x` in radians. .EX assert (1.0).atan() == 0.7854 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.atan2.3 b/man/man3/tomo-Num.atan2.3 index ee2400aa..e960bf99 100644 --- a/man/man3/tomo-Num.atan2.3 +++ b/man/man3/tomo-Num.atan2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.atan2 3 2025-09-21 "Tomo man-pages" +.TH Num.atan2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.atan2 \- arc tangent from 2 variables .SH LIBRARY @@ -32,3 +32,5 @@ The arc tangent of `x/y` in radians. .EX assert Num.atan2(1, 1) == 0.7854 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.atanh.3 b/man/man3/tomo-Num.atanh.3 index c7c30692..677e13ab 100644 --- a/man/man3/tomo-Num.atanh.3 +++ b/man/man3/tomo-Num.atanh.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.atanh 3 2025-09-21 "Tomo man-pages" +.TH Num.atanh 3 2025-11-29 "Tomo man-pages" .SH NAME Num.atanh \- arc hyperbolic tangent. .SH LIBRARY @@ -31,3 +31,5 @@ The inverse hyperbolic tangent of `x`. .EX assert (0.5).atanh() == 0.5493 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.cbrt.3 b/man/man3/tomo-Num.cbrt.3 index 15e0ee9e..05bfbb84 100644 --- a/man/man3/tomo-Num.cbrt.3 +++ b/man/man3/tomo-Num.cbrt.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.cbrt 3 2025-09-21 "Tomo man-pages" +.TH Num.cbrt 3 2025-11-29 "Tomo man-pages" .SH NAME Num.cbrt \- cube root .SH LIBRARY @@ -31,3 +31,5 @@ The cube root of `x`. .EX assert (27.0).cbrt() == 3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.ceil.3 b/man/man3/tomo-Num.ceil.3 index c0aac8a9..d096bce4 100644 --- a/man/man3/tomo-Num.ceil.3 +++ b/man/man3/tomo-Num.ceil.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.ceil 3 2025-09-21 "Tomo man-pages" +.TH Num.ceil 3 2025-11-29 "Tomo man-pages" .SH NAME Num.ceil \- ceiling function .SH LIBRARY @@ -31,3 +31,5 @@ The smallest integer greater than or equal to `x`. .EX assert (3.2).ceil() == 4 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.clamped.3 b/man/man3/tomo-Num.clamped.3 index 3ed48344..8561babc 100644 --- a/man/man3/tomo-Num.clamped.3 +++ b/man/man3/tomo-Num.clamped.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.clamped 3 2025-09-21 "Tomo man-pages" +.TH Num.clamped 3 2025-11-29 "Tomo man-pages" .SH NAME Num.clamped \- clamp a number .SH LIBRARY @@ -33,3 +33,5 @@ The first argument clamped between the other two arguments. .EX assert (2.5).clamped(5.5, 10.5) == 5.5 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.copysign.3 b/man/man3/tomo-Num.copysign.3 index 9230754c..e7ed54b9 100644 --- a/man/man3/tomo-Num.copysign.3 +++ b/man/man3/tomo-Num.copysign.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.copysign 3 2025-09-21 "Tomo man-pages" +.TH Num.copysign 3 2025-11-29 "Tomo man-pages" .SH NAME Num.copysign \- copy a number's sign .SH LIBRARY @@ -32,3 +32,5 @@ A number with the magnitude of `x` and the sign of `y`. .EX assert (3.0).copysign(-1) == -3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.cos.3 b/man/man3/tomo-Num.cos.3 index 6071c022..884a4f3e 100644 --- a/man/man3/tomo-Num.cos.3 +++ b/man/man3/tomo-Num.cos.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.cos 3 2025-09-21 "Tomo man-pages" +.TH Num.cos 3 2025-11-29 "Tomo man-pages" .SH NAME Num.cos \- cosine .SH LIBRARY @@ -31,3 +31,5 @@ The cosine of `x`. .EX assert (0.0).cos() == 1 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.cosh.3 b/man/man3/tomo-Num.cosh.3 index 843ec369..8a85b7c3 100644 --- a/man/man3/tomo-Num.cosh.3 +++ b/man/man3/tomo-Num.cosh.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.cosh 3 2025-09-21 "Tomo man-pages" +.TH Num.cosh 3 2025-11-29 "Tomo man-pages" .SH NAME Num.cosh \- hyperbolic cosine .SH LIBRARY @@ -31,3 +31,5 @@ The hyperbolic cosine of `x`. .EX assert (0.0).cosh() == 1 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.erf.3 b/man/man3/tomo-Num.erf.3 index aec6194f..a858ecda 100644 --- a/man/man3/tomo-Num.erf.3 +++ b/man/man3/tomo-Num.erf.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.erf 3 2025-09-21 "Tomo man-pages" +.TH Num.erf 3 2025-11-29 "Tomo man-pages" .SH NAME Num.erf \- error function .SH LIBRARY @@ -31,3 +31,5 @@ The error function of `x`. .EX assert (0.0).erf() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.erfc.3 b/man/man3/tomo-Num.erfc.3 index 27dcb44a..8b51d6cd 100644 --- a/man/man3/tomo-Num.erfc.3 +++ b/man/man3/tomo-Num.erfc.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.erfc 3 2025-09-21 "Tomo man-pages" +.TH Num.erfc 3 2025-11-29 "Tomo man-pages" .SH NAME Num.erfc \- complimentary error function .SH LIBRARY @@ -31,3 +31,5 @@ The complementary error function of `x`. .EX assert (0.0).erfc() == 1 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.exp.3 b/man/man3/tomo-Num.exp.3 index 4778a76d..651f43ea 100644 --- a/man/man3/tomo-Num.exp.3 +++ b/man/man3/tomo-Num.exp.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.exp 3 2025-09-21 "Tomo man-pages" +.TH Num.exp 3 2025-11-29 "Tomo man-pages" .SH NAME Num.exp \- base-e exponentiation .SH LIBRARY @@ -31,3 +31,5 @@ The value of $e^x$. .EX assert (1.0).exp() == 2.7183 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.exp2.3 b/man/man3/tomo-Num.exp2.3 index 1d997802..6e4f6626 100644 --- a/man/man3/tomo-Num.exp2.3 +++ b/man/man3/tomo-Num.exp2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.exp2 3 2025-09-21 "Tomo man-pages" +.TH Num.exp2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.exp2 \- base-2 exponentiation .SH LIBRARY @@ -31,3 +31,5 @@ The value of $2^x$. .EX assert (3.0).exp2() == 8 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.expm1.3 b/man/man3/tomo-Num.expm1.3 index 956bb3ac..c82f38df 100644 --- a/man/man3/tomo-Num.expm1.3 +++ b/man/man3/tomo-Num.expm1.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.expm1 3 2025-09-21 "Tomo man-pages" +.TH Num.expm1 3 2025-11-29 "Tomo man-pages" .SH NAME Num.expm1 \- base-e exponential minus 1 .SH LIBRARY @@ -31,3 +31,5 @@ The value of $e^x - 1$. .EX assert (1.0).expm1() == 1.7183 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.fdim.3 b/man/man3/tomo-Num.fdim.3 index 2498fc7b..f4b0a46a 100644 --- a/man/man3/tomo-Num.fdim.3 +++ b/man/man3/tomo-Num.fdim.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.fdim 3 2025-09-21 "Tomo man-pages" +.TH Num.fdim 3 2025-11-29 "Tomo man-pages" .SH NAME Num.fdim \- positive difference .SH LIBRARY @@ -34,3 +34,5 @@ fd assert (5.0).fdim(3) == 2 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.floor.3 b/man/man3/tomo-Num.floor.3 index 2107a1f0..ff78d081 100644 --- a/man/man3/tomo-Num.floor.3 +++ b/man/man3/tomo-Num.floor.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.floor 3 2025-09-21 "Tomo man-pages" +.TH Num.floor 3 2025-11-29 "Tomo man-pages" .SH NAME Num.floor \- floor function .SH LIBRARY @@ -31,3 +31,5 @@ The largest integer less than or equal to `x`. .EX assert (3.7).floor() == 3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.hypot.3 b/man/man3/tomo-Num.hypot.3 index 3c2e0913..de0d64a1 100644 --- a/man/man3/tomo-Num.hypot.3 +++ b/man/man3/tomo-Num.hypot.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.hypot 3 2025-09-21 "Tomo man-pages" +.TH Num.hypot 3 2025-11-29 "Tomo man-pages" .SH NAME Num.hypot \- Euclidean distance function .SH LIBRARY @@ -32,3 +32,5 @@ The Euclidean norm of `x` and `y`. .EX assert Num.hypot(3, 4) == 5 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.is_between.3 b/man/man3/tomo-Num.is_between.3 index 7077b397..bba3ad19 100644 --- a/man/man3/tomo-Num.is_between.3 +++ b/man/man3/tomo-Num.is_between.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.is_between 3 2025-09-21 "Tomo man-pages" +.TH Num.is_between 3 2025-11-29 "Tomo man-pages" .SH NAME Num.is_between \- check if a number is in a range .SH LIBRARY @@ -35,3 +35,5 @@ assert (7.5).is_between(1, 10) == yes assert (7.5).is_between(100, 200) == no assert (7.5).is_between(1, 7.5) == yes .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.isfinite.3 b/man/man3/tomo-Num.isfinite.3 index 99fdd913..fac2f19d 100644 --- a/man/man3/tomo-Num.isfinite.3 +++ b/man/man3/tomo-Num.isfinite.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.isfinite 3 2025-09-21 "Tomo man-pages" +.TH Num.isfinite 3 2025-11-29 "Tomo man-pages" .SH NAME Num.isfinite \- check for finite number .SH LIBRARY @@ -32,3 +32,5 @@ n Num The number to be checked. - assert (1.0).isfinite() == yes assert Num.INF.isfinite() == no .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.isinf.3 b/man/man3/tomo-Num.isinf.3 index f8587d7a..8de9736e 100644 --- a/man/man3/tomo-Num.isinf.3 +++ b/man/man3/tomo-Num.isinf.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.isinf 3 2025-09-21 "Tomo man-pages" +.TH Num.isinf 3 2025-11-29 "Tomo man-pages" .SH NAME Num.isinf \- check for infinite number .SH LIBRARY @@ -32,3 +32,5 @@ n Num The number to be checked. - assert Num.INF.isinf() == yes assert (1.0).isinf() == no .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.j0.3 b/man/man3/tomo-Num.j0.3 index 1ad0ed38..c93a5f24 100644 --- a/man/man3/tomo-Num.j0.3 +++ b/man/man3/tomo-Num.j0.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.j0 3 2025-09-21 "Tomo man-pages" +.TH Num.j0 3 2025-11-29 "Tomo man-pages" .SH NAME Num.j0 \- Bessel function .SH LIBRARY @@ -31,3 +31,5 @@ The Bessel function of the first kind of order 0 of `x`. .EX assert (0.0).j0() == 1 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.j1.3 b/man/man3/tomo-Num.j1.3 index 7f3fda5a..3d924958 100644 --- a/man/man3/tomo-Num.j1.3 +++ b/man/man3/tomo-Num.j1.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.j1 3 2025-09-21 "Tomo man-pages" +.TH Num.j1 3 2025-11-29 "Tomo man-pages" .SH NAME Num.j1 \- Bessel function .SH LIBRARY @@ -31,3 +31,5 @@ The Bessel function of the first kind of order 1 of `x`. .EX assert (0.0).j1() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.log.3 b/man/man3/tomo-Num.log.3 index 5cfd660c..aae022c0 100644 --- a/man/man3/tomo-Num.log.3 +++ b/man/man3/tomo-Num.log.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.log 3 2025-09-21 "Tomo man-pages" +.TH Num.log 3 2025-11-29 "Tomo man-pages" .SH NAME Num.log \- natural logarithm .SH LIBRARY @@ -31,3 +31,5 @@ The natural logarithm of `x`. .EX assert Num.E.log() == 1 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.log10.3 b/man/man3/tomo-Num.log10.3 index 87000cb9..1e5a13fc 100644 --- a/man/man3/tomo-Num.log10.3 +++ b/man/man3/tomo-Num.log10.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.log10 3 2025-09-21 "Tomo man-pages" +.TH Num.log10 3 2025-11-29 "Tomo man-pages" .SH NAME Num.log10 \- logarithm base-10 .SH LIBRARY @@ -31,3 +31,5 @@ The base-10 logarithm of `x`. .EX assert (100.0).log10() == 2 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.log1p.3 b/man/man3/tomo-Num.log1p.3 index dcf4a253..467e535d 100644 --- a/man/man3/tomo-Num.log1p.3 +++ b/man/man3/tomo-Num.log1p.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.log1p 3 2025-09-21 "Tomo man-pages" +.TH Num.log1p 3 2025-11-29 "Tomo man-pages" .SH NAME Num.log1p \- logarithm of 1 plus x .SH LIBRARY @@ -31,3 +31,5 @@ The value of $\log(1 + x)$. .EX assert (1.0).log1p() == 0.6931 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.log2.3 b/man/man3/tomo-Num.log2.3 index 3e162d15..ee0ea14b 100644 --- a/man/man3/tomo-Num.log2.3 +++ b/man/man3/tomo-Num.log2.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.log2 3 2025-09-21 "Tomo man-pages" +.TH Num.log2 3 2025-11-29 "Tomo man-pages" .SH NAME Num.log2 \- logarithm base-2 .SH LIBRARY @@ -31,3 +31,5 @@ The base-2 logarithm of `x`. .EX assert (8.0).log2() == 3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.logb.3 b/man/man3/tomo-Num.logb.3 index 519e6042..e2e5b738 100644 --- a/man/man3/tomo-Num.logb.3 +++ b/man/man3/tomo-Num.logb.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.logb 3 2025-09-21 "Tomo man-pages" +.TH Num.logb 3 2025-11-29 "Tomo man-pages" .SH NAME Num.logb \- exponent of a floating point value .SH LIBRARY @@ -31,3 +31,5 @@ The binary exponent of `x`. .EX assert (8.0).logb() == 3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.mix.3 b/man/man3/tomo-Num.mix.3 index f06462eb..01e5d7dd 100644 --- a/man/man3/tomo-Num.mix.3 +++ b/man/man3/tomo-Num.mix.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.mix 3 2025-09-21 "Tomo man-pages" +.TH Num.mix 3 2025-11-29 "Tomo man-pages" .SH NAME Num.mix \- mix two numbers by an amount .SH LIBRARY @@ -22,7 +22,7 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -amount Num The interpolation factor (between `0` and `1`). - +amount Num The interpolation factor (between \fB0\fR and \fB1\fR). - x Num The starting number. - y Num The ending number. - .TE @@ -34,3 +34,5 @@ The interpolated number between `x` and `y` based on `amount`. assert (0.5).mix(10, 20) == 15 assert (0.25).mix(10, 20) == 12.5 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.near.3 b/man/man3/tomo-Num.near.3 index ef1b80ce..824ba241 100644 --- a/man/man3/tomo-Num.near.3 +++ b/man/man3/tomo-Num.near.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.near 3 2025-09-21 "Tomo man-pages" +.TH Num.near 3 2025-11-29 "Tomo man-pages" .SH NAME Num.near \- check if two numbers are near each other .SH LIBRARY @@ -24,8 +24,8 @@ l l l l. Name Type Description Default x Num The first number. - y Num The second number. - -ratio Num The relative tolerance. Default is `1e-9`. 1e-9 -min_epsilon Num The absolute tolerance. Default is `1e-9`. 1e-9 +ratio Num The relative tolerance. Default is \fB1e-9\fR. 1e-9 +min_epsilon Num The absolute tolerance. Default is \fB1e-9\fR. 1e-9 .TE .SH RETURN `yes` if `x` and `y` are approximately equal within the specified tolerances, `no` otherwise. @@ -36,3 +36,5 @@ assert (1.0).near(1.000000001) == yes assert (100.0).near(110, ratio=0.1) == yes assert (5.0).near(5.1, min_epsilon=0.1) == yes .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.nextafter.3 b/man/man3/tomo-Num.nextafter.3 index 1cc51818..06256bdf 100644 --- a/man/man3/tomo-Num.nextafter.3 +++ b/man/man3/tomo-Num.nextafter.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.nextafter 3 2025-09-21 "Tomo man-pages" +.TH Num.nextafter 3 2025-11-29 "Tomo man-pages" .SH NAME Num.nextafter \- next floating point number .SH LIBRARY @@ -32,3 +32,5 @@ The next representable value after `x` in the direction of `y`. .EX assert (1.0).nextafter(1.1) == 1.0000000000000002 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.parse.3 b/man/man3/tomo-Num.parse.3 index d224e4e8..0df34a8f 100644 --- a/man/man3/tomo-Num.parse.3 +++ b/man/man3/tomo-Num.parse.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.parse 3 2025-09-21 "Tomo man-pages" +.TH Num.parse 3 2025-11-29 "Tomo man-pages" .SH NAME Num.parse \- convert text to number .SH LIBRARY @@ -37,3 +37,5 @@ remainder : Text assert Num.parse("1.5junk", &remainder) == 1.5 assert remainder == "junk" .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.percent.3 b/man/man3/tomo-Num.percent.3 index 5c41845e..4102bc86 100644 --- a/man/man3/tomo-Num.percent.3 +++ b/man/man3/tomo-Num.percent.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.percent 3 2025-09-21 "Tomo man-pages" +.TH Num.percent 3 2025-11-29 "Tomo man-pages" .SH NAME Num.percent \- format as a percentage .SH LIBRARY @@ -35,3 +35,5 @@ assert (1./3.).percent(2) == "33.33%" assert (1./3.).percent(2, precision=0.0001) == "33.3333%" assert (1./3.).percent(2, precision=10.) == "30%" .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.rint.3 b/man/man3/tomo-Num.rint.3 index ca1f9bfa..ae134089 100644 --- a/man/man3/tomo-Num.rint.3 +++ b/man/man3/tomo-Num.rint.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.rint 3 2025-09-21 "Tomo man-pages" +.TH Num.rint 3 2025-11-29 "Tomo man-pages" .SH NAME Num.rint \- round to nearest integer .SH LIBRARY @@ -32,3 +32,5 @@ The nearest integer value of `x`. assert (3.5).rint() == 4 assert (2.5).rint() == 2 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.round.3 b/man/man3/tomo-Num.round.3 index 18075d34..e35cf39f 100644 --- a/man/man3/tomo-Num.round.3 +++ b/man/man3/tomo-Num.round.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.round 3 2025-09-21 "Tomo man-pages" +.TH Num.round 3 2025-11-29 "Tomo man-pages" .SH NAME Num.round \- round to nearest integer .SH LIBRARY @@ -32,3 +32,5 @@ The nearest integer value of `x`. assert (2.3).round() == 2 assert (2.7).round() == 3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.significand.3 b/man/man3/tomo-Num.significand.3 index 8cf9102c..1cd6421d 100644 --- a/man/man3/tomo-Num.significand.3 +++ b/man/man3/tomo-Num.significand.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.significand 3 2025-09-21 "Tomo man-pages" +.TH Num.significand 3 2025-11-29 "Tomo man-pages" .SH NAME Num.significand \- get mantissa .SH LIBRARY @@ -31,3 +31,5 @@ The significand of `x`. .EX assert (1234.567).significand() == 0.1234567 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.sin.3 b/man/man3/tomo-Num.sin.3 index 1d67353f..5f3ad779 100644 --- a/man/man3/tomo-Num.sin.3 +++ b/man/man3/tomo-Num.sin.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.sin 3 2025-09-21 "Tomo man-pages" +.TH Num.sin 3 2025-11-29 "Tomo man-pages" .SH NAME Num.sin \- sine .SH LIBRARY @@ -31,3 +31,5 @@ The sine of `x`. .EX assert (0.0).sin() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.sinh.3 b/man/man3/tomo-Num.sinh.3 index c154356f..b3157201 100644 --- a/man/man3/tomo-Num.sinh.3 +++ b/man/man3/tomo-Num.sinh.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.sinh 3 2025-09-21 "Tomo man-pages" +.TH Num.sinh 3 2025-11-29 "Tomo man-pages" .SH NAME Num.sinh \- hyperbolic sine .SH LIBRARY @@ -31,3 +31,5 @@ The hyperbolic sine of `x`. .EX assert (0.0).sinh() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.sqrt.3 b/man/man3/tomo-Num.sqrt.3 index 82cba25e..c8db5200 100644 --- a/man/man3/tomo-Num.sqrt.3 +++ b/man/man3/tomo-Num.sqrt.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.sqrt 3 2025-09-21 "Tomo man-pages" +.TH Num.sqrt 3 2025-11-29 "Tomo man-pages" .SH NAME Num.sqrt \- square root .SH LIBRARY @@ -31,3 +31,5 @@ The square root of `x`. .EX assert (16.0).sqrt() == 4 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.tan.3 b/man/man3/tomo-Num.tan.3 index 3e66ebb7..a159a4fa 100644 --- a/man/man3/tomo-Num.tan.3 +++ b/man/man3/tomo-Num.tan.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.tan 3 2025-09-21 "Tomo man-pages" +.TH Num.tan 3 2025-11-29 "Tomo man-pages" .SH NAME Num.tan \- tangent .SH LIBRARY @@ -31,3 +31,5 @@ The tangent of `x`. .EX assert (0.0).tan() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.tanh.3 b/man/man3/tomo-Num.tanh.3 index 86c97449..0bd99114 100644 --- a/man/man3/tomo-Num.tanh.3 +++ b/man/man3/tomo-Num.tanh.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.tanh 3 2025-09-21 "Tomo man-pages" +.TH Num.tanh 3 2025-11-29 "Tomo man-pages" .SH NAME Num.tanh \- hyperbolic tangent .SH LIBRARY @@ -31,3 +31,5 @@ The hyperbolic tangent of `x`. .EX assert (0.0).tanh() == 0 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.tgamma.3 b/man/man3/tomo-Num.tgamma.3 index c2cfb0f1..3aa2b61a 100644 --- a/man/man3/tomo-Num.tgamma.3 +++ b/man/man3/tomo-Num.tgamma.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.tgamma 3 2025-09-21 "Tomo man-pages" +.TH Num.tgamma 3 2025-11-29 "Tomo man-pages" .SH NAME Num.tgamma \- true gamma function .SH LIBRARY @@ -31,3 +31,5 @@ The gamma function of `x`. .EX assert (1.0).tgamma() == 1 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.trunc.3 b/man/man3/tomo-Num.trunc.3 index e32b0949..7de1bbea 100644 --- a/man/man3/tomo-Num.trunc.3 +++ b/man/man3/tomo-Num.trunc.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.trunc 3 2025-09-21 "Tomo man-pages" +.TH Num.trunc 3 2025-11-29 "Tomo man-pages" .SH NAME Num.trunc \- truncate a number .SH LIBRARY @@ -32,3 +32,5 @@ The integer part of `x` towards zero. assert (3.7).trunc() == 3 assert (-3.7).trunc() == -3 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.with_precision.3 b/man/man3/tomo-Num.with_precision.3 index 66b5c0e9..5b1dc30c 100644 --- a/man/man3/tomo-Num.with_precision.3 +++ b/man/man3/tomo-Num.with_precision.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.with_precision 3 2025-09-21 "Tomo man-pages" +.TH Num.with_precision 3 2025-11-29 "Tomo man-pages" .SH NAME Num.with_precision \- round to a given precision .SH LIBRARY @@ -34,3 +34,5 @@ assert (0.1234567).with_precision(0.01) == 0.12 assert (123456.).with_precision(100) == 123500 assert (1234567.).with_precision(5) == 1234565 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.y0.3 b/man/man3/tomo-Num.y0.3 index 0645c252..7c20e545 100644 --- a/man/man3/tomo-Num.y0.3 +++ b/man/man3/tomo-Num.y0.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.y0 3 2025-09-21 "Tomo man-pages" +.TH Num.y0 3 2025-11-29 "Tomo man-pages" .SH NAME Num.y0 \- Bessel function .SH LIBRARY @@ -31,3 +31,5 @@ The Bessel function of the second kind of order 0 of `x`. .EX assert (1.0).y0() == -0.7652 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Num.y1.3 b/man/man3/tomo-Num.y1.3 index ef572874..1fee30e7 100644 --- a/man/man3/tomo-Num.y1.3 +++ b/man/man3/tomo-Num.y1.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Num.y1 3 2025-09-21 "Tomo man-pages" +.TH Num.y1 3 2025-11-29 "Tomo man-pages" .SH NAME Num.y1 \- Bessel function .SH LIBRARY @@ -31,3 +31,5 @@ The Bessel function of the second kind of order 1 of `x`. .EX assert (1.0).y1() == 0.4401 .EE +.SH SEE ALSO +.BR Tomo-Num (3) diff --git a/man/man3/tomo-Path.3 b/man/man3/tomo-Path.3 new file mode 100644 index 00000000..f383196e --- /dev/null +++ b/man/man3/tomo-Path.3 @@ -0,0 +1,347 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Path 3 2025-11-29 "Tomo man-pages" +.SH NAME +Path \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Path.accessed\ :\ func(path:\ Path,\ follow_symlinks:\ Bool\ =\ yes\ ->\ Int64?) +Gets the file access time of a file. + +For more, see: +.BR Tomo-Path.accessed (3) + + +.TP +.BI Path.append\ :\ func(path:\ Path,\ text:\ Text,\ permissions:\ Int32\ =\ Int32(0o644)\ ->\ Void) +Appends the given text to the file at the specified path, creating the file if it doesn't already exist. Failure to write will result in a runtime error. + +For more, see: +.BR Tomo-Path.append (3) + + +.TP +.BI Path.append_bytes\ :\ func(path:\ Path,\ bytes:\ [Byte],\ permissions:\ Int32\ =\ Int32(0o644)\ ->\ Void) +Appends the given bytes to the file at the specified path, creating the file if it doesn't already exist. Failure to write will result in a runtime error. + +For more, see: +.BR Tomo-Path.append_bytes (3) + + +.TP +.BI Path.base_name\ :\ func(path:\ Path\ ->\ Text) +Returns the base name of the file or directory at the specified path. + +For more, see: +.BR Tomo-Path.base_name (3) + + +.TP +.BI Path.by_line\ :\ func(path:\ Path\ ->\ func(->Text?)?) +Returns an iterator that can be used to iterate over a file one line at a time, or returns none if the file could not be opened. + +For more, see: +.BR Tomo-Path.by_line (3) + + +.TP +.BI Path.can_execute\ :\ func(path:\ Path\ ->\ Bool) +Returns whether or not a file can be executed by the current user/group. + +For more, see: +.BR Tomo-Path.can_execute (3) + + +.TP +.BI Path.can_read\ :\ func(path:\ Path\ ->\ Bool) +Returns whether or not a file can be read by the current user/group. + +For more, see: +.BR Tomo-Path.can_read (3) + + +.TP +.BI Path.can_write\ :\ func(path:\ Path\ ->\ Bool) +Returns whether or not a file can be written by the current user/group. + +For more, see: +.BR Tomo-Path.can_write (3) + + +.TP +.BI Path.changed\ :\ func(path:\ Path,\ follow_symlinks:\ Bool\ =\ yes\ ->\ Int64?) +Gets the file change time of a file. + +For more, see: +.BR Tomo-Path.changed (3) + + +.TP +.BI Path.child\ :\ func(path:\ Path,\ child:\ Text\ ->\ Path) +Return a path that is a child of another path. + +For more, see: +.BR Tomo-Path.child (3) + + +.TP +.BI Path.children\ :\ func(path:\ Path,\ include_hidden\ =\ no\ ->\ [Path]) +Returns a list of children (files and directories) within the directory at the specified path. Optionally includes hidden files. + +For more, see: +.BR Tomo-Path.children (3) + + +.TP +.BI Path.create_directory\ :\ func(path:\ Path,\ permissions\ =\ Int32(0o755),\ recursive\ =\ yes\ ->\ Void) +Creates a new directory at the specified path with the given permissions. If any of the parent directories do not exist, they will be created as needed. + +For more, see: +.BR Tomo-Path.create_directory (3) + + +.TP +.BI Path.current_dir\ :\ func(->\ Path) +Creates a new directory at the specified path with the given permissions. If any of the parent directories do not exist, they will be created as needed. + +For more, see: +.BR Tomo-Path.current_dir (3) + + +.TP +.BI Path.exists\ :\ func(path:\ Path\ ->\ Bool) +Checks if a file or directory exists at the specified path. + +For more, see: +.BR Tomo-Path.exists (3) + + +.TP +.BI Path.expand_home\ :\ func(path:\ Path\ ->\ Path) +For home-based paths (those starting with \fB~\fR), expand the path to replace the tilde with and absolute path to the user's \fB$HOME\fR directory. + +For more, see: +.BR Tomo-Path.expand_home (3) + + +.TP +.BI Path.extension\ :\ func(path:\ Path,\ full:\ Bool\ =\ yes\ ->\ Text) +Returns the file extension of the file at the specified path. Optionally returns the full extension. + +For more, see: +.BR Tomo-Path.extension (3) + + +.TP +.BI Path.files\ :\ func(path:\ Path,\ include_hidden:\ Bool\ =\ no\ ->\ [Path]) +Returns a list of files within the directory at the specified path. Optionally includes hidden files. + +For more, see: +.BR Tomo-Path.files (3) + + +.TP +.BI Path.from_components\ :\ func(components:\ [Text]\ ->\ Path) +Returns a path built from a list of path components. + +For more, see: +.BR Tomo-Path.from_components (3) + + +.TP +.BI Path.glob\ :\ func(path:\ Path\ ->\ [Path]) +Perform a globbing operation and return a list of matching paths. Some glob specific details: - The paths "." and ".." are *not* included in any globbing results. - Files or directories that begin with "." will not match \fB*\fR, but will match \fB.*\fR. - Globs do support \fB{a,b}\fR syntax for matching files that match any of several choices of patterns. - The shell-style syntax \fB**\fR for matching subdirectories is not supported. + +For more, see: +.BR Tomo-Path.glob (3) + + +.TP +.BI Path.group\ :\ func(path:\ Path,\ follow_symlinks:\ Bool\ =\ yes\ ->\ Text?) +Get the owning group of a file or directory. + +For more, see: +.BR Tomo-Path.group (3) + + +.TP +.BI Path.has_extension\ :\ func(path:\ Path,\ extension:\ Text\ ->\ Bool) +Return whether or not a path has a given file extension. + +For more, see: +.BR Tomo-Path.has_extension (3) + + +.TP +.BI Path.is_directory\ :\ func(path:\ Path,\ follow_symlinks\ =\ yes\ ->\ Bool) +Checks if the path represents a directory. Optionally follows symbolic links. + +For more, see: +.BR Tomo-Path.is_directory (3) + + +.TP +.BI Path.is_file\ :\ func(path:\ Path,\ follow_symlinks\ =\ yes\ ->\ Bool) +Checks if the path represents a file. Optionally follows symbolic links. + +For more, see: +.BR Tomo-Path.is_file (3) + + +.TP +.BI Path.is_socket\ :\ func(path:\ Path,\ follow_symlinks\ =\ yes\ ->\ Bool) +Checks if the path represents a socket. Optionally follows symbolic links. + +For more, see: +.BR Tomo-Path.is_socket (3) + + +.TP +.BI Path.is_symlink\ :\ func(path:\ Path\ ->\ Bool) +Checks if the path represents a symbolic link. + +For more, see: +.BR Tomo-Path.is_symlink (3) + + +.TP +.BI Path.lines\ :\ func(path:\ Path\ ->\ [Text]?) +Returns a list with the lines of text in a file or returns none if the file could not be opened. + +For more, see: +.BR Tomo-Path.lines (3) + + +.TP +.BI Path.modified\ :\ func(path:\ Path,\ follow_symlinks:\ Bool\ =\ yes\ ->\ Int64?) +Gets the file modification time of a file. + +For more, see: +.BR Tomo-Path.modified (3) + + +.TP +.BI Path.owner\ :\ func(path:\ Path,\ follow_symlinks:\ Bool\ =\ yes\ ->\ Text?) +Get the owning user of a file or directory. + +For more, see: +.BR Tomo-Path.owner (3) + + +.TP +.BI Path.parent\ :\ func(path:\ Path\ ->\ Path) +Returns the parent directory of the file or directory at the specified path. + +For more, see: +.BR Tomo-Path.parent (3) + + +.TP +.BI Path.read\ :\ func(path:\ Path\ ->\ Text?) +Reads the contents of the file at the specified path or none if the file could not be read. + +For more, see: +.BR Tomo-Path.read (3) + + +.TP +.BI Path.read_bytes\ :\ func(path:\ Path,\ limit:\ Int?\ =\ none\ ->\ [Byte]?) +Reads the contents of the file at the specified path or none if the file could not be read. + +For more, see: +.BR Tomo-Path.read_bytes (3) + + +.TP +.BI Path.relative_to\ :\ func(path:\ Path,\ relative_to\ =\ (./)\ ->\ Path) +Returns the path relative to a given base path. By default, the base path is the current directory. + +For more, see: +.BR Tomo-Path.relative_to (3) + + +.TP +.BI Path.remove\ :\ func(path:\ Path,\ ignore_missing\ =\ no\ ->\ Void) +Removes the file or directory at the specified path. A runtime error is raised if something goes wrong. + +For more, see: +.BR Tomo-Path.remove (3) + + +.TP +.BI Path.resolved\ :\ func(path:\ Path,\ relative_to\ =\ (./)\ ->\ Path) +Resolves the absolute path of the given path relative to a base path. By default, the base path is the current directory. + +For more, see: +.BR Tomo-Path.resolved (3) + + +.TP +.BI Path.set_owner\ :\ func(path:\ Path,\ owner:\ Text?\ =\ none,\ group:\ Text?\ =\ none,\ follow_symlinks:\ Bool\ =\ yes\ ->\ Void) +Set the owning user and/or group for a path. + +For more, see: +.BR Tomo-Path.set_owner (3) + + +.TP +.BI Path.sibling\ :\ func(path:\ Path,\ name:\ Text\ ->\ Path) +Return a path that is a sibling of another path (i.e. has the same parent, but a different name). This is equivalent to \fB.parent().child(name)\fR + +For more, see: +.BR Tomo-Path.sibling (3) + + +.TP +.BI Path.subdirectories\ :\ func(path:\ Path,\ include_hidden\ =\ no\ ->\ [Path]) +Returns a list of subdirectories within the directory at the specified path. Optionally includes hidden subdirectories. + +For more, see: +.BR Tomo-Path.subdirectories (3) + + +.TP +.BI Path.unique_directory\ :\ func(path:\ Path\ ->\ Path) +Generates a unique directory path based on the given path. Useful for creating temporary directories. + +For more, see: +.BR Tomo-Path.unique_directory (3) + + +.TP +.BI Path.write\ :\ func(path:\ Path,\ text:\ Text,\ permissions\ =\ Int32(0o644)\ ->\ Void) +Writes the given text to the file at the specified path, creating the file if it doesn't already exist. Sets the file permissions as specified. If the file writing cannot be successfully completed, a runtime error is raised. + +For more, see: +.BR Tomo-Path.write (3) + + +.TP +.BI Path.write_bytes\ :\ func(path:\ Path,\ bytes:\ [Byte],\ permissions\ =\ Int32(0o644)\ ->\ Void) +Writes the given bytes to the file at the specified path, creating the file if it doesn't already exist. Sets the file permissions as specified. If the file writing cannot be successfully completed, a runtime error is raised. + +For more, see: +.BR Tomo-Path.write_bytes (3) + + +.TP +.BI Path.write_unique\ :\ func(path:\ Path,\ text:\ Text\ ->\ Path) +Writes the given text to a unique file path based on the specified path. The file is created if it doesn't exist. This is useful for creating temporary files. + +For more, see: +.BR Tomo-Path.write_unique (3) + + +.TP +.BI Path.write_unique_bytes\ :\ func(path:\ Path,\ bytes:\ [Byte]\ ->\ Path) +Writes the given bytes to a unique file path based on the specified path. The file is created if it doesn't exist. This is useful for creating temporary files. + +For more, see: +.BR Tomo-Path.write_unique_bytes (3) + diff --git a/man/man3/tomo-Path.accessed.3 b/man/man3/tomo-Path.accessed.3 index 51e4bbed..0c09b7cf 100644 --- a/man/man3/tomo-Path.accessed.3 +++ b/man/man3/tomo-Path.accessed.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.accessed 3 2025-09-21 "Tomo man-pages" +.TH Path.accessed 3 2025-11-29 "Tomo man-pages" .SH NAME Path.accessed \- access time .SH LIBRARY @@ -33,3 +33,5 @@ A 64-bit unix epoch timestamp representing when the file or directory was last a assert (./file.txt).accessed() == 1704221100 assert (./not-a-file).accessed() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.append.3 b/man/man3/tomo-Path.append.3 index af1f0a5f..b065d55b 100644 --- a/man/man3/tomo-Path.append.3 +++ b/man/man3/tomo-Path.append.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.append 3 2025-05-17 "Tomo man-pages" +.TH Path.append 3 2025-11-29 "Tomo man-pages" .SH NAME Path.append \- append to a file .SH LIBRARY @@ -33,3 +33,5 @@ Nothing. .EX (./log.txt).append("extra line$(\[rs]n)") .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.append_bytes.3 b/man/man3/tomo-Path.append_bytes.3 index 3a6dc1c8..48f795c3 100644 --- a/man/man3/tomo-Path.append_bytes.3 +++ b/man/man3/tomo-Path.append_bytes.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.append_bytes 3 2025-05-17 "Tomo man-pages" +.TH Path.append_bytes 3 2025-11-29 "Tomo man-pages" .SH NAME Path.append_bytes \- append bytes to a file .SH LIBRARY @@ -33,3 +33,5 @@ Nothing. .EX (./log.txt).append_bytes([104, 105]) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.base_name.3 b/man/man3/tomo-Path.base_name.3 index fe43fc04..3d6e0f07 100644 --- a/man/man3/tomo-Path.base_name.3 +++ b/man/man3/tomo-Path.base_name.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.base_name 3 2025-09-21 "Tomo man-pages" +.TH Path.base_name 3 2025-11-29 "Tomo man-pages" .SH NAME Path.base_name \- base name of a file .SH LIBRARY @@ -31,3 +31,5 @@ The base name of the file or directory. .EX assert (./path/to/file.txt).base_name() == "file.txt" .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.by_line.3 b/man/man3/tomo-Path.by_line.3 index 02a75c5a..ad08ca33 100644 --- a/man/man3/tomo-Path.by_line.3 +++ b/man/man3/tomo-Path.by_line.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.by_line 3 2025-11-15 "Tomo man-pages" +.TH Path.by_line 3 2025-11-29 "Tomo man-pages" .SH NAME Path.by_line \- iterate by line .SH LIBRARY @@ -40,3 +40,5 @@ else for line in (/dev/stdin).by_line()! say(line.upper()) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.can_execute.3 b/man/man3/tomo-Path.can_execute.3 index 7f9ed358..90978a32 100644 --- a/man/man3/tomo-Path.can_execute.3 +++ b/man/man3/tomo-Path.can_execute.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.can_execute 3 2025-09-21 "Tomo man-pages" +.TH Path.can_execute 3 2025-11-29 "Tomo man-pages" .SH NAME Path.can_execute \- check execute permissions .SH LIBRARY @@ -33,3 +33,5 @@ assert (/bin/sh).can_execute() == yes assert (/usr/include/stdlib.h).can_execute() == no assert (/non/existant/file).can_execute() == no .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.can_read.3 b/man/man3/tomo-Path.can_read.3 index 30cb39a0..919b5312 100644 --- a/man/man3/tomo-Path.can_read.3 +++ b/man/man3/tomo-Path.can_read.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.can_read 3 2025-09-21 "Tomo man-pages" +.TH Path.can_read 3 2025-11-29 "Tomo man-pages" .SH NAME Path.can_read \- check read permissions .SH LIBRARY @@ -33,3 +33,5 @@ assert (/usr/include/stdlib.h).can_read() == yes assert (/etc/shadow).can_read() == no assert (/non/existant/file).can_read() == no .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.can_write.3 b/man/man3/tomo-Path.can_write.3 index d1be5006..98e8c0bb 100644 --- a/man/man3/tomo-Path.can_write.3 +++ b/man/man3/tomo-Path.can_write.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.can_write 3 2025-09-21 "Tomo man-pages" +.TH Path.can_write 3 2025-11-29 "Tomo man-pages" .SH NAME Path.can_write \- check write permissions .SH LIBRARY @@ -33,3 +33,5 @@ assert (/tmp).can_write() == yes assert (/etc/passwd).can_write() == no assert (/non/existant/file).can_write() == no .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.changed.3 b/man/man3/tomo-Path.changed.3 index b6bd8033..ab32a94f 100644 --- a/man/man3/tomo-Path.changed.3 +++ b/man/man3/tomo-Path.changed.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.changed 3 2025-09-21 "Tomo man-pages" +.TH Path.changed 3 2025-11-29 "Tomo man-pages" .SH NAME Path.changed \- get the last changed time .SH LIBRARY @@ -36,3 +36,5 @@ This is the ["ctime"](https://en.wikipedia.org/wiki/Stat_(system_call)#ctime) of assert (./file.txt).changed() == 1704221100 assert (./not-a-file).changed() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.child.3 b/man/man3/tomo-Path.child.3 index f61bc9d0..ee0ca448 100644 --- a/man/man3/tomo-Path.child.3 +++ b/man/man3/tomo-Path.child.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.child 3 2025-09-21 "Tomo man-pages" +.TH Path.child 3 2025-11-29 "Tomo man-pages" .SH NAME Path.child \- append a child to a path .SH LIBRARY @@ -32,3 +32,5 @@ A new path representing the child. .EX assert (./directory).child("file.txt") == (./directory/file.txt) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.children.3 b/man/man3/tomo-Path.children.3 index 10e80713..feee88d9 100644 --- a/man/man3/tomo-Path.children.3 +++ b/man/man3/tomo-Path.children.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.children 3 2025-09-21 "Tomo man-pages" +.TH Path.children 3 2025-11-29 "Tomo man-pages" .SH NAME Path.children \- get children of a directory .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default path Path The path of the directory. - -include_hidden Whether to include hidden files, which start with a `.`. no +include_hidden Whether to include hidden files, which start with a \fB.\fR. no .TE .SH RETURN A list of paths for the children. @@ -32,3 +32,5 @@ A list of paths for the children. .EX assert (./directory).children(include_hidden=yes) == [".git", "foo.txt"] .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.create_directory.3 b/man/man3/tomo-Path.create_directory.3 index db50d468..539aae36 100644 --- a/man/man3/tomo-Path.create_directory.3 +++ b/man/man3/tomo-Path.create_directory.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.create_directory 3 2025-11-27 "Tomo man-pages" +.TH Path.create_directory 3 2025-11-29 "Tomo man-pages" .SH NAME Path.create_directory \- make a directory .SH LIBRARY @@ -24,7 +24,7 @@ l l l l. Name Type Description Default path Path The path of the directory to create. - permissions The permissions to set on the new directory. Int32(0o755) -recursive If set to `yes`, then recursively create any parent directories if they don't exist, otherwise fail if the parent directory does not exist. When set to `yes`, this function behaves like `mkdir -p`. yes +recursive If set to \fByes\fR, then recursively create any parent directories if they don't exist, otherwise fail if the parent directory does not exist. When set to \fByes\fR, this function behaves like \fBmkdir -p\fR. yes .TE .SH RETURN Nothing. @@ -35,3 +35,5 @@ Nothing. .EX (./new_directory).create_directory() .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.current_dir.3 b/man/man3/tomo-Path.current_dir.3 index 2d887983..8f9f58c3 100644 --- a/man/man3/tomo-Path.current_dir.3 +++ b/man/man3/tomo-Path.current_dir.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.current_dir 3 2025-09-21 "Tomo man-pages" +.TH Path.current_dir 3 2025-11-29 "Tomo man-pages" .SH NAME Path.current_dir \- get current directory .SH LIBRARY @@ -22,3 +22,5 @@ The absolute path of the current directory. .EX assert Path.current_dir() == (/home/user/tomo) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.exists.3 b/man/man3/tomo-Path.exists.3 index 923fa27d..5143a4d3 100644 --- a/man/man3/tomo-Path.exists.3 +++ b/man/man3/tomo-Path.exists.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.exists 3 2025-09-21 "Tomo man-pages" +.TH Path.exists 3 2025-11-29 "Tomo man-pages" .SH NAME Path.exists \- check if a path exists .SH LIBRARY @@ -31,3 +31,5 @@ path Path The path to check. - .EX assert (/).exists() == yes .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.expand_home.3 b/man/man3/tomo-Path.expand_home.3 index 7114b65b..b14aff25 100644 --- a/man/man3/tomo-Path.expand_home.3 +++ b/man/man3/tomo-Path.expand_home.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.expand_home 3 2025-10-11 "Tomo man-pages" +.TH Path.expand_home 3 2025-11-29 "Tomo man-pages" .SH NAME Path.expand_home \- expand ~ to $HOME .SH LIBRARY @@ -34,3 +34,5 @@ assert (~/foo).expand_home() == (/home/user/foo) # No change assert (/foo).expand_home() == (/foo) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.extension.3 b/man/man3/tomo-Path.extension.3 index f77f692a..71b65f77 100644 --- a/man/man3/tomo-Path.extension.3 +++ b/man/man3/tomo-Path.extension.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.extension 3 2025-09-21 "Tomo man-pages" +.TH Path.extension 3 2025-11-29 "Tomo man-pages" .SH NAME Path.extension \- get file extension .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default path Path The path of the file. - -full Bool Whether to return everything after the first `.` in the base name, or only the last part of the extension. yes +full Bool Whether to return everything after the first \fB.\fR in the base name, or only the last part of the extension. yes .TE .SH RETURN The file extension (not including the leading `.`) or an empty text if there is no file extension. @@ -35,3 +35,5 @@ assert (./file.tar.gz).extension(full=no) == "gz" assert (/foo).extension() == "" assert (./.git).extension() == "" .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.files.3 b/man/man3/tomo-Path.files.3 index fcde934f..cf72a388 100644 --- a/man/man3/tomo-Path.files.3 +++ b/man/man3/tomo-Path.files.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.files 3 2025-09-21 "Tomo man-pages" +.TH Path.files 3 2025-11-29 "Tomo man-pages" .SH NAME Path.files \- list files in a directory .SH LIBRARY @@ -32,3 +32,5 @@ A list of file paths. .EX assert (./directory).files(include_hidden=yes) == [(./directory/file1.txt), (./directory/file2.txt)] .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.from_components.3 b/man/man3/tomo-Path.from_components.3 index f7dbd7f1..6ef19089 100644 --- a/man/man3/tomo-Path.from_components.3 +++ b/man/man3/tomo-Path.from_components.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.from_components 3 2025-09-21 "Tomo man-pages" +.TH Path.from_components 3 2025-11-29 "Tomo man-pages" .SH NAME Path.from_components \- build a path from components .SH LIBRARY @@ -33,3 +33,5 @@ assert Path.from_components(["/", "usr", "include"]) == (/usr/include) assert Path.from_components(["foo.txt"]) == (./foo.txt) assert Path.from_components(["~", ".local"]) == (~/.local) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.glob.3 b/man/man3/tomo-Path.glob.3 index 07de7a33..fc8d04b8 100644 --- a/man/man3/tomo-Path.glob.3 +++ b/man/man3/tomo-Path.glob.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.glob 3 2025-09-21 "Tomo man-pages" +.TH Path.glob 3 2025-11-29 "Tomo man-pages" .SH NAME Path.glob \- perform file globbing .SH LIBRARY @@ -28,7 +28,7 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -path Path The path of the directory which may contain special globbing characters like `*`, `?`, or `{...}` - +path Path The path of the directory which may contain special globbing characters like \fB*\fR, \fB?\fR, or \fB{...}\fR - .TE .SH RETURN A list of file paths that match the glob. @@ -44,3 +44,5 @@ assert (./.*).glob() == [(./.hidden)] # Globs with no matches return an empty list: assert (./*.xxx).glob() == [] .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.group.3 b/man/man3/tomo-Path.group.3 index 5c9f80c8..c7ebdb27 100644 --- a/man/man3/tomo-Path.group.3 +++ b/man/man3/tomo-Path.group.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.group 3 2025-09-21 "Tomo man-pages" +.TH Path.group 3 2025-11-29 "Tomo man-pages" .SH NAME Path.group \- get the owning group .SH LIBRARY @@ -33,3 +33,5 @@ The name of the group which owns the file or directory, or `none` if the path do assert (/bin).group() == "root" assert (/non/existent/file).group() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.has_extension.3 b/man/man3/tomo-Path.has_extension.3 index ffd1f967..85b181e1 100644 --- a/man/man3/tomo-Path.has_extension.3 +++ b/man/man3/tomo-Path.has_extension.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.has_extension 3 2025-09-21 "Tomo man-pages" +.TH Path.has_extension 3 2025-11-29 "Tomo man-pages" .SH NAME Path.has_extension \- check if a path has a given extension .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default path Path A path. - -extension Text A file extension (leading `.` is optional). If empty, the check will test if the file does not have any file extension. - +extension Text A file extension (leading \fB.\fR is optional). If empty, the check will test if the file does not have any file extension. - .TE .SH RETURN Whether or not the path has the given extension. @@ -35,3 +35,5 @@ assert (/foo.txt).has_extension(".txt") == yes assert (/foo.tar.gz).has_extension("gz") == yes assert (/foo.tar.gz).has_extension("zip") == no .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.is_directory.3 b/man/man3/tomo-Path.is_directory.3 index 8ed41249..81391108 100644 --- a/man/man3/tomo-Path.is_directory.3 +++ b/man/man3/tomo-Path.is_directory.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.is_directory 3 2025-09-21 "Tomo man-pages" +.TH Path.is_directory 3 2025-11-29 "Tomo man-pages" .SH NAME Path.is_directory \- check if a path is a directory .SH LIBRARY @@ -33,3 +33,5 @@ follow_symlinks Whether to follow symbolic links. yes assert (./directory/).is_directory() == yes assert (./file.txt).is_directory() == no .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.is_file.3 b/man/man3/tomo-Path.is_file.3 index 8d6218f3..7d7be65b 100644 --- a/man/man3/tomo-Path.is_file.3 +++ b/man/man3/tomo-Path.is_file.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.is_file 3 2025-09-21 "Tomo man-pages" +.TH Path.is_file 3 2025-11-29 "Tomo man-pages" .SH NAME Path.is_file \- check if a path is a file .SH LIBRARY @@ -33,3 +33,5 @@ follow_symlinks Whether to follow symbolic links. yes assert (./file.txt).is_file() == yes assert (./directory/).is_file() == no .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.is_socket.3 b/man/man3/tomo-Path.is_socket.3 index 1733364e..1da3bdce 100644 --- a/man/man3/tomo-Path.is_socket.3 +++ b/man/man3/tomo-Path.is_socket.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.is_socket 3 2025-09-21 "Tomo man-pages" +.TH Path.is_socket 3 2025-11-29 "Tomo man-pages" .SH NAME Path.is_socket \- check if a path is a socket .SH LIBRARY @@ -32,3 +32,5 @@ follow_symlinks Whether to follow symbolic links. yes .EX assert (./socket).is_socket() == yes .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.is_symlink.3 b/man/man3/tomo-Path.is_symlink.3 index 6a8bdb7e..85db4e43 100644 --- a/man/man3/tomo-Path.is_symlink.3 +++ b/man/man3/tomo-Path.is_symlink.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.is_symlink 3 2025-09-21 "Tomo man-pages" +.TH Path.is_symlink 3 2025-11-29 "Tomo man-pages" .SH NAME Path.is_symlink \- check if a path is a symbolic link .SH LIBRARY @@ -31,3 +31,5 @@ path Path The path to check. - .EX assert (./link).is_symlink() == yes .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.lines.3 b/man/man3/tomo-Path.lines.3 index e4e95e7e..cf9a2312 100644 --- a/man/man3/tomo-Path.lines.3 +++ b/man/man3/tomo-Path.lines.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.lines 3 2025-11-23 "Tomo man-pages" +.TH Path.lines 3 2025-11-29 "Tomo man-pages" .SH NAME Path.lines \- return the lines in a file .SH LIBRARY @@ -31,3 +31,5 @@ A list of the lines in a file or none if the file couldn't be read. .EX lines := (./file.txt).lines()! .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.modified.3 b/man/man3/tomo-Path.modified.3 index c91aae03..a5780e9f 100644 --- a/man/man3/tomo-Path.modified.3 +++ b/man/man3/tomo-Path.modified.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.modified 3 2025-09-21 "Tomo man-pages" +.TH Path.modified 3 2025-11-29 "Tomo man-pages" .SH NAME Path.modified \- get file modification time .SH LIBRARY @@ -33,3 +33,5 @@ A 64-bit unix epoch timestamp representing when the file or directory was last m assert (./file.txt).modified() == 1704221100 assert (./not-a-file).modified() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.owner.3 b/man/man3/tomo-Path.owner.3 index 2f4913cd..95bcd089 100644 --- a/man/man3/tomo-Path.owner.3 +++ b/man/man3/tomo-Path.owner.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.owner 3 2025-09-21 "Tomo man-pages" +.TH Path.owner 3 2025-11-29 "Tomo man-pages" .SH NAME Path.owner \- get file owner .SH LIBRARY @@ -33,3 +33,5 @@ The name of the user who owns the file or directory, or `none` if the path does assert (/bin).owner() == "root" assert (/non/existent/file).owner() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.parent.3 b/man/man3/tomo-Path.parent.3 index 459d97c3..7113f4e0 100644 --- a/man/man3/tomo-Path.parent.3 +++ b/man/man3/tomo-Path.parent.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.parent 3 2025-09-21 "Tomo man-pages" +.TH Path.parent 3 2025-11-29 "Tomo man-pages" .SH NAME Path.parent \- get parent directory .SH LIBRARY @@ -31,3 +31,5 @@ The path of the parent directory. .EX assert (./path/to/file.txt).parent() == (./path/to/) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.read.3 b/man/man3/tomo-Path.read.3 index 779bb397..7787b66a 100644 --- a/man/man3/tomo-Path.read.3 +++ b/man/man3/tomo-Path.read.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.read 3 2025-09-21 "Tomo man-pages" +.TH Path.read 3 2025-11-29 "Tomo man-pages" .SH NAME Path.read \- read file contents .SH LIBRARY @@ -32,3 +32,5 @@ The contents of the file. If the file could not be read, none will be returned. assert (./hello.txt).read() == "Hello" assert (./nosuchfile.xxx).read() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.read_bytes.3 b/man/man3/tomo-Path.read_bytes.3 index a23cbf6d..11c0310e 100644 --- a/man/man3/tomo-Path.read_bytes.3 +++ b/man/man3/tomo-Path.read_bytes.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.read_bytes 3 2025-09-21 "Tomo man-pages" +.TH Path.read_bytes 3 2025-11-29 "Tomo man-pages" .SH NAME Path.read_bytes \- read file contents as bytes .SH LIBRARY @@ -33,3 +33,5 @@ The byte contents of the file. If the file cannot be read, none will be returned assert (./hello.txt).read() == [72, 101, 108, 108, 111] assert (./nosuchfile.xxx).read() == none .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.relative_to.3 b/man/man3/tomo-Path.relative_to.3 index 963b9a5b..a3bf2136 100644 --- a/man/man3/tomo-Path.relative_to.3 +++ b/man/man3/tomo-Path.relative_to.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.relative_to 3 2025-09-21 "Tomo man-pages" +.TH Path.relative_to 3 2025-11-29 "Tomo man-pages" .SH NAME Path.relative_to \- apply a relative path to another .SH LIBRARY @@ -32,3 +32,5 @@ The relative path. .EX assert (./path/to/file.txt).relative(relative_to=(./path)) == (./to/file.txt) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.remove.3 b/man/man3/tomo-Path.remove.3 index 7dcb4361..a98b4483 100644 --- a/man/man3/tomo-Path.remove.3 +++ b/man/man3/tomo-Path.remove.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.remove 3 2025-05-17 "Tomo man-pages" +.TH Path.remove 3 2025-11-29 "Tomo man-pages" .SH NAME Path.remove \- remove a file or directory .SH LIBRARY @@ -32,3 +32,5 @@ Nothing. .EX (./file.txt).remove() .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.resolved.3 b/man/man3/tomo-Path.resolved.3 index a40fd80c..1b22ec08 100644 --- a/man/man3/tomo-Path.resolved.3 +++ b/man/man3/tomo-Path.resolved.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.resolved 3 2025-09-21 "Tomo man-pages" +.TH Path.resolved 3 2025-11-29 "Tomo man-pages" .SH NAME Path.resolved \- resolve a path .SH LIBRARY @@ -33,3 +33,5 @@ The resolved absolute path. assert (~/foo).resolved() == (/home/user/foo) assert (./path/to/file.txt).resolved(relative_to=(/foo)) == (/foo/path/to/file.txt) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.set_owner.3 b/man/man3/tomo-Path.set_owner.3 index f83d9470..b0b24e71 100644 --- a/man/man3/tomo-Path.set_owner.3 +++ b/man/man3/tomo-Path.set_owner.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.set_owner 3 2025-05-17 "Tomo man-pages" +.TH Path.set_owner 3 2025-11-29 "Tomo man-pages" .SH NAME Path.set_owner \- set the owner .SH LIBRARY @@ -34,3 +34,5 @@ Nothing. If a path does not exist, a failure will be raised. .EX (./file.txt).set_owner(owner="root", group="wheel") .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.sibling.3 b/man/man3/tomo-Path.sibling.3 index 5c39d159..7d4bbd04 100644 --- a/man/man3/tomo-Path.sibling.3 +++ b/man/man3/tomo-Path.sibling.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.sibling 3 2025-09-21 "Tomo man-pages" +.TH Path.sibling 3 2025-11-29 "Tomo man-pages" .SH NAME Path.sibling \- get another path in the same directory .SH LIBRARY @@ -32,3 +32,5 @@ A new path representing the sibling. .EX assert (/foo/baz).sibling("doop") == (/foo/doop) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.subdirectories.3 b/man/man3/tomo-Path.subdirectories.3 index a691f94a..f2bb371b 100644 --- a/man/man3/tomo-Path.subdirectories.3 +++ b/man/man3/tomo-Path.subdirectories.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.subdirectories 3 2025-09-21 "Tomo man-pages" +.TH Path.subdirectories 3 2025-11-29 "Tomo man-pages" .SH NAME Path.subdirectories \- get subdirectories .SH LIBRARY @@ -33,3 +33,5 @@ A list of subdirectory paths. assert (./directory).subdirectories() == [(./directory/subdir1), (./directory/subdir2)] assert (./directory).subdirectories(include_hidden=yes) == [(./directory/.git), (./directory/subdir1), (./directory/subdir2)] .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.unique_directory.3 b/man/man3/tomo-Path.unique_directory.3 index 866ca565..16df8d8b 100644 --- a/man/man3/tomo-Path.unique_directory.3 +++ b/man/man3/tomo-Path.unique_directory.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.unique_directory 3 2025-09-21 "Tomo man-pages" +.TH Path.unique_directory 3 2025-11-29 "Tomo man-pages" .SH NAME Path.unique_directory \- create a directory with a unique name .SH LIBRARY @@ -22,7 +22,7 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -path Path The base path for generating the unique directory. The last six letters of this path must be `XXXXXX`. - +path Path The base path for generating the unique directory. The last six letters of this path must be \fBXXXXXX\fR. - .TE .SH RETURN A unique directory path after creating the directory. @@ -33,3 +33,5 @@ assert created := (/tmp/my-dir.XXXXXX).unique_directory() == (/tmp/my-dir-AwoxbM assert created.is_directory() == yes created.remove() .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.write.3 b/man/man3/tomo-Path.write.3 index 447e407e..6d9e1043 100644 --- a/man/man3/tomo-Path.write.3 +++ b/man/man3/tomo-Path.write.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.write 3 2025-05-17 "Tomo man-pages" +.TH Path.write 3 2025-11-29 "Tomo man-pages" .SH NAME Path.write \- write to a file .SH LIBRARY @@ -33,3 +33,5 @@ Nothing. .EX (./file.txt).write("Hello, world!") .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.write_bytes.3 b/man/man3/tomo-Path.write_bytes.3 index d914378f..6534d18e 100644 --- a/man/man3/tomo-Path.write_bytes.3 +++ b/man/man3/tomo-Path.write_bytes.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.write_bytes 3 2025-05-17 "Tomo man-pages" +.TH Path.write_bytes 3 2025-11-29 "Tomo man-pages" .SH NAME Path.write_bytes \- write bytes to a file .SH LIBRARY @@ -33,3 +33,5 @@ Nothing. .EX (./file.txt).write_bytes([104, 105]) .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.write_unique.3 b/man/man3/tomo-Path.write_unique.3 index 94f3cd6f..49d9aa78 100644 --- a/man/man3/tomo-Path.write_unique.3 +++ b/man/man3/tomo-Path.write_unique.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.write_unique 3 2025-09-21 "Tomo man-pages" +.TH Path.write_unique 3 2025-11-29 "Tomo man-pages" .SH NAME Path.write_unique \- write to a uniquely named file .SH LIBRARY @@ -22,7 +22,7 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -path Path The base path for generating the unique file. This path must include the string `XXXXXX` in the file base name. - +path Path The base path for generating the unique file. This path must include the string \fBXXXXXX\fR in the file base name. - text Text The text to write to the file. - .TE .SH RETURN @@ -35,3 +35,5 @@ assert created == (./file-27QHtq.txt) assert created.read() == "Hello, world!" created.remove() .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Path.write_unique_bytes.3 b/man/man3/tomo-Path.write_unique_bytes.3 index f4a82e63..5d08812e 100644 --- a/man/man3/tomo-Path.write_unique_bytes.3 +++ b/man/man3/tomo-Path.write_unique_bytes.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.write_unique_bytes 3 2025-09-21 "Tomo man-pages" +.TH Path.write_unique_bytes 3 2025-11-29 "Tomo man-pages" .SH NAME Path.write_unique_bytes \- write bytes to a uniquely named file .SH LIBRARY @@ -22,7 +22,7 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -path Path The base path for generating the unique file. This path must include the string `XXXXXX` in the file base name. - +path Path The base path for generating the unique file. This path must include the string \fBXXXXXX\fR in the file base name. - bytes [Byte] The bytes to write to the file. - .TE .SH RETURN @@ -35,3 +35,5 @@ assert created == (./file-27QHtq.txt) assert created.read() == [1, 2, 3] created.remove() .EE +.SH SEE ALSO +.BR Tomo-Path (3) diff --git a/man/man3/tomo-Table.3 b/man/man3/tomo-Table.3 new file mode 100644 index 00000000..f12f5b18 --- /dev/null +++ b/man/man3/tomo-Table.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Table 3 2025-11-29 "Tomo man-pages" +.SH NAME +Table \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Table.clear\ :\ func(t:\ &{K:V}\ ->\ Void) +Removes all key-value pairs from the table. + +For more, see: +.BR Tomo-Table.clear (3) + + +.TP +.BI Table.difference\ :\ func(t:\ {K:V},\ other:\ {K:V}\ ->\ {K:V}) +Return a table whose key/value pairs correspond to keys only present in one table, but not the other. + +For more, see: +.BR Tomo-Table.difference (3) + + +.TP +.BI Table.get\ :\ func(t:\ {K:V},\ key:\ K\ ->\ V?) +Retrieves the value associated with a key, or returns \fBnone\fR if the key is not present. + +For more, see: +.BR Tomo-Table.get (3) + + +.TP +.BI Table.get_or_set\ :\ func(t:\ &{K:V},\ key:\ K,\ default:\ V\ ->\ V?) +If the given key is in the table, return the associated value. Otherwise, insert the given default value into the table and return it. + +For more, see: +.BR Tomo-Table.get_or_set (3) + + +.TP +.BI Table.has\ :\ func(t:\ {K:V},\ key:\ K\ ->\ Bool) +Checks if the table contains a specified key. + +For more, see: +.BR Tomo-Table.has (3) + + +.TP +.BI Table.intersection\ :\ func(t:\ {K:V},\ other:\ {K:V}\ ->\ {K:V}) +Return a table with only the matching key/value pairs that are common to both tables. + +For more, see: +.BR Tomo-Table.intersection (3) + + +.TP +.BI Table.remove\ :\ func(t:\ {K:V},\ key:\ K\ ->\ Void) +Removes the key-value pair associated with a specified key. + +For more, see: +.BR Tomo-Table.remove (3) + + +.TP +.BI Table.set\ :\ func(t:\ {K:V},\ key:\ K,\ value:\ V\ ->\ Void) +Sets or updates the value associated with a specified key. + +For more, see: +.BR Tomo-Table.set (3) + + +.TP +.BI Table.with\ :\ func(t:\ {K:V},\ other:\ {K:V}\ ->\ {K:V}) +Return a copy of a table with values added from another table + +For more, see: +.BR Tomo-Table.with (3) + + +.TP +.BI Table.with_fallback\ :\ func(t:\ {K:V},\ fallback:\ {K:V}?\ ->\ {K:V}) +Return a copy of a table with a different fallback table. + +For more, see: +.BR Tomo-Table.with_fallback (3) + + +.TP +.BI Table.without\ :\ func(t:\ {K:V},\ other:\ {K:V}\ ->\ {K:V}) +Return a copy of a table, but without any of the exact key/value pairs found in the other table. + +For more, see: +.BR Tomo-Table.without (3) + diff --git a/man/man3/tomo-Table.clear.3 b/man/man3/tomo-Table.clear.3 index 5b1be29e..18938cb1 100644 --- a/man/man3/tomo-Table.clear.3 +++ b/man/man3/tomo-Table.clear.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.clear 3 2025-09-21 "Tomo man-pages" +.TH Table.clear 3 2025-11-29 "Tomo man-pages" .SH NAME Table.clear \- clear a table .SH LIBRARY @@ -33,3 +33,5 @@ t := &{"A":1} t.clear() assert t == {} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.difference.3 b/man/man3/tomo-Table.difference.3 index 8f123834..999f0e55 100644 --- a/man/man3/tomo-Table.difference.3 +++ b/man/man3/tomo-Table.difference.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.difference 3 2025-09-21 "Tomo man-pages" +.TH Table.difference 3 2025-11-29 "Tomo man-pages" .SH NAME Table.difference \- return a table using keys not present in both tables .SH LIBRARY @@ -34,3 +34,5 @@ t1 := {"A": 1; "B": 2, "C": 3} t2 := {"B": 2, "C":30, "D": 40} assert t1.difference(t2) == {"A": 1, "D": 40} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.get.3 b/man/man3/tomo-Table.get.3 index ede699cf..e12143f1 100644 --- a/man/man3/tomo-Table.get.3 +++ b/man/man3/tomo-Table.get.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.get 3 2025-09-21 "Tomo man-pages" +.TH Table.get 3 2025-11-29 "Tomo man-pages" .SH NAME Table.get \- get an item from a table .SH LIBRARY @@ -39,3 +39,5 @@ assert t.get("????") == none assert t.get("A")! == 1 assert t.get("????") or 0 == 0 .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.get_or_set.3 b/man/man3/tomo-Table.get_or_set.3 index 38e73a4b..a5d100c4 100644 --- a/man/man3/tomo-Table.get_or_set.3 +++ b/man/man3/tomo-Table.get_or_set.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.get_or_set 3 2025-09-21 "Tomo man-pages" +.TH Table.get_or_set 3 2025-11-29 "Tomo man-pages" .SH NAME Table.get_or_set \- get an item or set a default if absent .SH LIBRARY @@ -43,3 +43,5 @@ assert t == &{"A": @[1, 2, 3, 4], "B": @[99]} assert t.get_or_set("C", @[0, 0, 0]) == @[0, 0, 0] assert t == &{"A": @[1, 2, 3, 4], "B": @[99], "C": @[0, 0, 0]} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.has.3 b/man/man3/tomo-Table.has.3 index b2efffd6..5bfb9554 100644 --- a/man/man3/tomo-Table.has.3 +++ b/man/man3/tomo-Table.has.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.has 3 2025-09-21 "Tomo man-pages" +.TH Table.has 3 2025-11-29 "Tomo man-pages" .SH NAME Table.has \- check for a key .SH LIBRARY @@ -33,3 +33,5 @@ key K The key to check for presence. - assert {"A": 1, "B": 2}.has("A") == yes assert {"A": 1, "B": 2}.has("xxx") == no .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.intersection.3 b/man/man3/tomo-Table.intersection.3 index 64a2e32c..67b4c0d3 100644 --- a/man/man3/tomo-Table.intersection.3 +++ b/man/man3/tomo-Table.intersection.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.intersection 3 2025-09-21 "Tomo man-pages" +.TH Table.intersection 3 2025-11-29 "Tomo man-pages" .SH NAME Table.intersection \- return a table with common key/value pairs from two tables .SH LIBRARY @@ -34,3 +34,5 @@ t1 := {"A": 1; "B": 2, "C": 3} t2 := {"B": 2, "C":30, "D": 40} assert t1.intersection(t2) == {"B": 2} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.remove.3 b/man/man3/tomo-Table.remove.3 index ce6010b3..d41c2ec0 100644 --- a/man/man3/tomo-Table.remove.3 +++ b/man/man3/tomo-Table.remove.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.remove 3 2025-09-21 "Tomo man-pages" +.TH Table.remove 3 2025-11-29 "Tomo man-pages" .SH NAME Table.remove \- remove a table entry .SH LIBRARY @@ -34,3 +34,5 @@ t := {"A": 1, "B": 2} t.remove("A") assert t == {"B": 2} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.set.3 b/man/man3/tomo-Table.set.3 index f1303189..f321f8eb 100644 --- a/man/man3/tomo-Table.set.3 +++ b/man/man3/tomo-Table.set.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.set 3 2025-09-21 "Tomo man-pages" +.TH Table.set 3 2025-11-29 "Tomo man-pages" .SH NAME Table.set \- set a table entry .SH LIBRARY @@ -35,3 +35,5 @@ t := {"A": 1, "B": 2} t.set("C", 3) assert t == {"A": 1, "B": 2, "C": 3} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.with.3 b/man/man3/tomo-Table.with.3 index 988fb888..740a1058 100644 --- a/man/man3/tomo-Table.with.3 +++ b/man/man3/tomo-Table.with.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.with 3 2025-09-21 "Tomo man-pages" +.TH Table.with 3 2025-11-29 "Tomo man-pages" .SH NAME Table.with \- return a table with values added from another table .SH LIBRARY @@ -33,3 +33,5 @@ The original table, but with values from the other table added. t := {"A": 1; "B": 2} assert t.with({"B": 20, "C": 30}) == {"A": 1, "B": 20, "C": 30} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.with_fallback.3 b/man/man3/tomo-Table.with_fallback.3 index c0719bd3..7ef520f0 100644 --- a/man/man3/tomo-Table.with_fallback.3 +++ b/man/man3/tomo-Table.with_fallback.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.with_fallback 3 2025-09-21 "Tomo man-pages" +.TH Table.with_fallback 3 2025-11-29 "Tomo man-pages" .SH NAME Table.with_fallback \- return a table with a new fallback .SH LIBRARY @@ -36,3 +36,5 @@ assert t2["B"] == 3 t3 = t.with_fallback(none) assert t2["B"] == none .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Table.without.3 b/man/man3/tomo-Table.without.3 index 7244dac6..c71b96a3 100644 --- a/man/man3/tomo-Table.without.3 +++ b/man/man3/tomo-Table.without.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Table.without 3 2025-09-21 "Tomo man-pages" +.TH Table.without 3 2025-11-29 "Tomo man-pages" .SH NAME Table.without \- return a table without key/value pairs in another table .SH LIBRARY @@ -36,3 +36,5 @@ Only exact key/value pairs will be discarded. Keys with a non-matching value wil t := {"A": 1; "B": 2, "C": 3} assert t.without({"B": 2, "C": 30, "D": 40}) == {"A": 1, "C": 3} .EE +.SH SEE ALSO +.BR Tomo-Table (3) diff --git a/man/man3/tomo-Text.3 b/man/man3/tomo-Text.3 new file mode 100644 index 00000000..634e3e0a --- /dev/null +++ b/man/man3/tomo-Text.3 @@ -0,0 +1,339 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Text 3 2025-11-29 "Tomo man-pages" +.SH NAME +Text \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Text.as_c_string\ :\ func(text:\ Text\ ->\ CString) +Converts a \fBText\fR value to a C-style string. + +For more, see: +.BR Tomo-Text.as_c_string (3) + + +.TP +.BI Text.at\ :\ func(text:\ Text,\ index:\ Int\ ->\ Text) +Get the graphical cluster at a given index. This is similar to \fBstr[i]\fR with ASCII text, but has more correct behavior for unicode text. + +For more, see: +.BR Tomo-Text.at (3) + + +.TP +.BI Text.by_line\ :\ func(text:\ Text\ ->\ func(->Text?)) +Returns an iterator function that can be used to iterate over the lines in a text. + +For more, see: +.BR Tomo-Text.by_line (3) + + +.TP +.BI Text.by_split\ :\ func(text:\ Text,\ delimiter:\ Text\ =\ ""\ ->\ func(->Text?)) +Returns an iterator function that can be used to iterate over text separated by a delimiter. + +For more, see: +.BR Tomo-Text.by_split (3) + + +.TP +.BI Text.by_split_any\ :\ func(text:\ Text,\ delimiters:\ Text\ =\ "\ $\[rs]t\[rs]r\[rs]n"\ ->\ func(->Text?)) +Returns an iterator function that can be used to iterate over text separated by one or more characters (grapheme clusters) from a given text of delimiters. + +For more, see: +.BR Tomo-Text.by_split_any (3) + + +.TP +.BI Text.caseless_equals\ :\ func(a:\ Text,\ b:\ Text,\ language:\ Text\ =\ "C"\ ->\ Bool) +Checks whether two texts are equal, ignoring the casing of the letters (i.e. case-insensitive comparison). + +For more, see: +.BR Tomo-Text.caseless_equals (3) + + +.TP +.BI Text.codepoint_names\ :\ func(text:\ Text\ ->\ [Text]) +Returns a list of the names of each codepoint in the text. + +For more, see: +.BR Tomo-Text.codepoint_names (3) + + +.TP +.BI Text.ends_with\ :\ func(text:\ Text,\ suffix:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Bool) +Checks if the \fBText\fR ends with a literal suffix text. + +For more, see: +.BR Tomo-Text.ends_with (3) + + +.TP +.BI Text.find\ :\ func(text:\ Text,\ target:\ Text,\ start:\ Int\ =\ 1\ ->\ Int) +Find a substring within a text and return its index, if found. + +For more, see: +.BR Tomo-Text.find (3) + + +.TP +.BI Text.from\ :\ func(text:\ Text,\ first:\ Int\ ->\ Text) +Get a slice of the text, starting at the given position. + +For more, see: +.BR Tomo-Text.from (3) + + +.TP +.BI Text.from_c_string\ :\ func(str:\ CString\ ->\ Text) +Converts a C-style string to a \fBText\fR value. + +For more, see: +.BR Tomo-Text.from_c_string (3) + + +.TP +.BI Text.from_codepoint_names\ :\ func(codepoint_names:\ [Text]\ ->\ [Text]) +Returns text that has the given codepoint names (according to the Unicode specification) as its codepoints. + +For more, see: +.BR Tomo-Text.from_codepoint_names (3) + + +.TP +.BI Text.from_utf16\ :\ func(bytes:\ [Int16]\ ->\ [Text]) +Returns text that has been constructed from the given UTF16 sequence. + +For more, see: +.BR Tomo-Text.from_utf16 (3) + + +.TP +.BI Text.from_utf32\ :\ func(codepoints:\ [Int32]\ ->\ [Text]) +Returns text that has been constructed from the given UTF32 codepoints. + +For more, see: +.BR Tomo-Text.from_utf32 (3) + + +.TP +.BI Text.from_utf8\ :\ func(bytes:\ [Byte]\ ->\ [Text]) +Returns text that has been constructed from the given UTF8 bytes. + +For more, see: +.BR Tomo-Text.from_utf8 (3) + + +.TP +.BI Text.has\ :\ func(text:\ Text,\ target:\ Text\ ->\ Bool) +Checks if the \fBText\fR contains some target text. + +For more, see: +.BR Tomo-Text.has (3) + + +.TP +.BI Text.join\ :\ func(glue:\ Text,\ pieces:\ [Text]\ ->\ Text) +Joins a list of text pieces with a specified glue. + +For more, see: +.BR Tomo-Text.join (3) + + +.TP +.BI Text.left_pad\ :\ func(text:\ Text,\ width:\ Int,\ pad:\ Text\ =\ "\ ",\ language:\ Text\ =\ "C"\ ->\ Text) +Pad some text on the left side so it reaches a target width. + +For more, see: +.BR Tomo-Text.left_pad (3) + + +.TP +.BI Text.lines\ :\ func(text:\ Text\ ->\ [Text]) +Splits the text into a list of lines of text, preserving blank lines, ignoring trailing newlines, and handling \fB\r\n\fR the same as \fB\n\fR. + +For more, see: +.BR Tomo-Text.lines (3) + + +.TP +.BI Text.lower\ :\ func(text:\ Text,\ language:\ Text\ =\ "C"\ ->\ Text) +Converts all characters in the text to lowercase. + +For more, see: +.BR Tomo-Text.lower (3) + + +.TP +.BI Text.middle_pad\ :\ func(text:\ Text,\ width:\ Int,\ pad:\ Text\ =\ "\ ",\ language:\ Text\ =\ "C"\ ->\ Text) +Pad some text on the left and right side so it reaches a target width. + +For more, see: +.BR Tomo-Text.middle_pad (3) + + +.TP +.BI Text.quoted\ :\ func(text:\ Text,\ color:\ Bool\ =\ no,\ quotation_mark:\ Text\ =\ `"`\ ->\ Text) +Formats the text with quotation marks and escapes. + +For more, see: +.BR Tomo-Text.quoted (3) + + +.TP +.BI Text.repeat\ :\ func(text:\ Text,\ count:\ Int\ ->\ Text) +Repeat some text multiple times. + +For more, see: +.BR Tomo-Text.repeat (3) + + +.TP +.BI Text.replace\ :\ func(text:\ Text,\ target:\ Text,\ replacement:\ Text\ ->\ Text) +Replaces occurrences of a target text with a replacement text. + +For more, see: +.BR Tomo-Text.replace (3) + + +.TP +.BI Text.reversed\ :\ func(text:\ Text\ ->\ Text) +Return a text that has the grapheme clusters in reverse order. + +For more, see: +.BR Tomo-Text.reversed (3) + + +.TP +.BI Text.right_pad\ :\ func(text:\ Text,\ width:\ Int,\ pad:\ Text\ =\ "\ ",\ language:\ Text\ =\ "C"\ ->\ Text) +Pad some text on the right side so it reaches a target width. + +For more, see: +.BR Tomo-Text.right_pad (3) + + +.TP +.BI Text.slice\ :\ func(text:\ Text,\ from:\ Int\ =\ 1,\ to:\ Int\ =\ -1\ ->\ Text) +Get a slice of the text. + +For more, see: +.BR Tomo-Text.slice (3) + + +.TP +.BI Text.split\ :\ func(text:\ Text,\ delimiter:\ Text\ =\ ""\ ->\ [Text]) +Splits the text into a list of substrings based on exact matches of a delimiter. + +For more, see: +.BR Tomo-Text.split (3) + + +.TP +.BI Text.split_any\ :\ func(text:\ Text,\ delimiters:\ Text\ =\ "\ $\[rs]t\[rs]r\[rs]n"\ ->\ [Text]) +Splits the text into a list of substrings at one or more occurrences of a set of delimiter characters (grapheme clusters). + +For more, see: +.BR Tomo-Text.split_any (3) + + +.TP +.BI Text.starts_with\ :\ func(text:\ Text,\ prefix:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Bool) +Checks if the \fBText\fR starts with a literal prefix text. + +For more, see: +.BR Tomo-Text.starts_with (3) + + +.TP +.BI Text.title\ :\ func(text:\ Text,\ language:\ Text\ =\ "C"\ ->\ Text) +Converts the text to title case (capitalizing the first letter of each word). + +For more, see: +.BR Tomo-Text.title (3) + + +.TP +.BI Text.to\ :\ func(text:\ Text,\ last:\ Int\ ->\ Text) +Get a slice of the text, ending at the given position. + +For more, see: +.BR Tomo-Text.to (3) + + +.TP +.BI Text.translate\ :\ func(text:\ Text,\ translations:\ {Text:Text}\ ->\ Text) +Takes a table mapping target texts to their replacements and performs all the replacements in the table on the whole text. At each position, the first matching replacement is applied and the matching moves on to *after* the replacement text, so replacement text is not recursively modified. See Text.replace() for more information about replacement behavior. + +For more, see: +.BR Tomo-Text.translate (3) + + +.TP +.BI Text.trim\ :\ func(text:\ Text,\ to_trim:\ Text\ =\ "\ $\[rs]t\[rs]r\[rs]n",\ left:\ Bool\ =\ yes,\ right:\ Bool\ =\ yes\ ->\ Text) +Trims the given characters (grapheme clusters) from the left and/or right side of the text. + +For more, see: +.BR Tomo-Text.trim (3) + + +.TP +.BI Text.upper\ :\ func(text:\ Text,\ language:\ Text\ =\ "C"\ ->\ Text) +Converts all characters in the text to uppercase. + +For more, see: +.BR Tomo-Text.upper (3) + + +.TP +.BI Text.utf16\ :\ func(text:\ Text\ ->\ [Int16]) +Returns a list of Unicode code points for UTF16 encoding of the text. + +For more, see: +.BR Tomo-Text.utf16 (3) + + +.TP +.BI Text.utf32\ :\ func(text:\ Text\ ->\ [Int32]) +Returns a list of Unicode code points for UTF32 encoding of the text. + +For more, see: +.BR Tomo-Text.utf32 (3) + + +.TP +.BI Text.utf8\ :\ func(text:\ Text\ ->\ [Byte]) +Converts a \fBText\fR value to a list of bytes representing a UTF8 encoding of the text. + +For more, see: +.BR Tomo-Text.utf8 (3) + + +.TP +.BI Text.width\ :\ func(text:\ Text\ ->\ Int) +Returns the display width of the text as seen in a terminal with appropriate font rendering. This is usually the same as the text's \fB.length\fR, but there are some characters like emojis that render wider than 1 cell. + +For more, see: +.BR Tomo-Text.width (3) + + +.TP +.BI Text.without_prefix\ :\ func(text:\ Text,\ prefix:\ Text\ ->\ Text) +Returns the text with a given prefix removed (if present). + +For more, see: +.BR Tomo-Text.without_prefix (3) + + +.TP +.BI Text.without_suffix\ :\ func(text:\ Text,\ suffix:\ Text\ ->\ Text) +Returns the text with a given suffix removed (if present). + +For more, see: +.BR Tomo-Text.without_suffix (3) + diff --git a/man/man3/tomo-Text.as_c_string.3 b/man/man3/tomo-Text.as_c_string.3 index ef49eeb7..2bdf0b11 100644 --- a/man/man3/tomo-Text.as_c_string.3 +++ b/man/man3/tomo-Text.as_c_string.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.as_c_string 3 2025-09-21 "Tomo man-pages" +.TH Text.as_c_string 3 2025-11-29 "Tomo man-pages" .SH NAME Text.as_c_string \- convert to C-style string .SH LIBRARY @@ -31,3 +31,5 @@ A C-style string (`CString`) representing the text. .EX assert "Hello".as_c_string() == CString("Hello") .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.at.3 b/man/man3/tomo-Text.at.3 index 2d46c256..3396ae19 100644 --- a/man/man3/tomo-Text.at.3 +++ b/man/man3/tomo-Text.at.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.at 3 2025-09-21 "Tomo man-pages" +.TH Text.at 3 2025-11-29 "Tomo man-pages" .SH NAME Text.at \- get a letter .SH LIBRARY @@ -35,3 +35,5 @@ Negative indices are counted from the back of the text, so `-1` means the last c .EX assert "Amélie".at(3) == "é" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.by_line.3 b/man/man3/tomo-Text.by_line.3 index 6f28263b..f1fa17bc 100644 --- a/man/man3/tomo-Text.by_line.3 +++ b/man/man3/tomo-Text.by_line.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.by_line 3 2025-04-30 "Tomo man-pages" +.TH Text.by_line 3 2025-11-29 "Tomo man-pages" .SH NAME Text.by_line \- iterate by line .SH LIBRARY @@ -40,3 +40,5 @@ for line in text.by_line() # Prints: "line one" then "line two": say(line) .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.by_split.3 b/man/man3/tomo-Text.by_split.3 index 3acef72e..12f15674 100644 --- a/man/man3/tomo-Text.by_split.3 +++ b/man/man3/tomo-Text.by_split.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.by_split 3 2025-04-30 "Tomo man-pages" +.TH Text.by_split 3 2025-11-29 "Tomo man-pages" .SH NAME Text.by_split \- iterate by a spliting text .SH LIBRARY @@ -39,3 +39,5 @@ for chunk in text.by_split(",") # Prints: "one" then "two" then "three": say(chunk) .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.by_split_any.3 b/man/man3/tomo-Text.by_split_any.3 index c8616c82..158fed1c 100644 --- a/man/man3/tomo-Text.by_split_any.3 +++ b/man/man3/tomo-Text.by_split_any.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.by_split_any 3 2025-04-30 "Tomo man-pages" +.TH Text.by_split_any 3 2025-11-29 "Tomo man-pages" .SH NAME Text.by_split_any \- iterate by one of many splitting characters .SH LIBRARY @@ -39,3 +39,5 @@ for chunk in text.by_split_any(",;") # Prints: "one" then "two" then "three": say(chunk) .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.caseless_equals.3 b/man/man3/tomo-Text.caseless_equals.3 index 1470c4db..d4fdf8de 100644 --- a/man/man3/tomo-Text.caseless_equals.3 +++ b/man/man3/tomo-Text.caseless_equals.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.caseless_equals 3 2025-09-21 "Tomo man-pages" +.TH Text.caseless_equals 3 2025-11-29 "Tomo man-pages" .SH NAME Text.caseless_equals \- case-insensitive comparison .SH LIBRARY @@ -36,3 +36,5 @@ assert "A".caseless_equals("a") == yes # Turkish lowercase "I" is "ı" (dotless I), not "i" assert "I".caseless_equals("i", language="tr_TR") == no .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.codepoint_names.3 b/man/man3/tomo-Text.codepoint_names.3 index 61a4c9a5..b91baba4 100644 --- a/man/man3/tomo-Text.codepoint_names.3 +++ b/man/man3/tomo-Text.codepoint_names.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.codepoint_names 3 2025-09-21 "Tomo man-pages" +.TH Text.codepoint_names 3 2025-11-29 "Tomo man-pages" .SH NAME Text.codepoint_names \- get unicode codepoint names .SH LIBRARY @@ -38,3 +38,5 @@ assert "Amélie".codepoint_names() == [ "LATIN SMALL LETTER E", ] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.ends_with.3 b/man/man3/tomo-Text.ends_with.3 index 7b5ff696..a9391874 100644 --- a/man/man3/tomo-Text.ends_with.3 +++ b/man/man3/tomo-Text.ends_with.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.ends_with 3 2025-09-21 "Tomo man-pages" +.TH Text.ends_with 3 2025-11-29 "Tomo man-pages" .SH NAME Text.ends_with \- check suffix .SH LIBRARY @@ -36,3 +36,5 @@ remainder : Text assert "hello world".ends_with("world", &remainder) == yes assert remainder == "hello " .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.find.3 b/man/man3/tomo-Text.find.3 index 17d78a0a..b145ae3c 100644 --- a/man/man3/tomo-Text.find.3 +++ b/man/man3/tomo-Text.find.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.find 3 2025-11-23 "Tomo man-pages" +.TH Text.find 3 2025-11-29 "Tomo man-pages" .SH NAME Text.find \- find a substring .SH LIBRARY @@ -36,3 +36,5 @@ assert "one two".find("two") == 5 assert "one two".find("three") == none assert "one two".find("o", start=2) == 7 .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.from.3 b/man/man3/tomo-Text.from.3 index 6132c572..30e62958 100644 --- a/man/man3/tomo-Text.from.3 +++ b/man/man3/tomo-Text.from.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.from 3 2025-09-21 "Tomo man-pages" +.TH Text.from 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from \- slice from a starting index .SH LIBRARY @@ -36,3 +36,5 @@ A negative index counts backwards from the end of the text, so `-1` refers to th assert "hello".from(2) == "ello" assert "hello".from(-2) == "lo" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.from_c_string.3 b/man/man3/tomo-Text.from_c_string.3 index 98b153d8..1144001b 100644 --- a/man/man3/tomo-Text.from_c_string.3 +++ b/man/man3/tomo-Text.from_c_string.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.from_c_string 3 2025-09-21 "Tomo man-pages" +.TH Text.from_c_string 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from_c_string \- convert C-style string to text .SH LIBRARY @@ -31,3 +31,5 @@ A `Text` value representing the C-style string. .EX assert Text.from_c_string(CString("Hello")) == "Hello" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.from_codepoint_names.3 b/man/man3/tomo-Text.from_codepoint_names.3 index 4a1f9f56..2951b0f2 100644 --- a/man/man3/tomo-Text.from_codepoint_names.3 +++ b/man/man3/tomo-Text.from_codepoint_names.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.from_codepoint_names 3 2025-10-11 "Tomo man-pages" +.TH Text.from_codepoint_names 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from_codepoint_names \- convert list of unicode codepoint names to text .SH LIBRARY @@ -39,3 +39,5 @@ text := Text.from_codepoint_names([ ] assert text == "Åke" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.from_utf16.3 b/man/man3/tomo-Text.from_utf16.3 index 6668baf0..ba92c691 100644 --- a/man/man3/tomo-Text.from_utf16.3 +++ b/man/man3/tomo-Text.from_utf16.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.from_utf16 3 2025-09-21 "Tomo man-pages" +.TH Text.from_utf16 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from_utf16 \- convert UTF16 list to text .SH LIBRARY @@ -35,3 +35,5 @@ The text will be normalized, so the resulting text's UTF16 sequence may not exac assert Text.from_utf16([197, 107, 101]) == "Åke" assert Text.from_utf16([12371, 12435, 12395, 12385, 12399, 19990, 30028]) == "こんにちは世界".utf16() .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.from_utf32.3 b/man/man3/tomo-Text.from_utf32.3 index d93ad2c9..526545fb 100644 --- a/man/man3/tomo-Text.from_utf32.3 +++ b/man/man3/tomo-Text.from_utf32.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.from_utf32 3 2025-09-21 "Tomo man-pages" +.TH Text.from_utf32 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from_utf32 \- convert UTF32 codepoints to text .SH LIBRARY @@ -34,3 +34,5 @@ The text will be normalized, so the resulting text's codepoints may not exactly .EX assert Text.from_utf32([197, 107, 101]) == "Åke" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.from_utf8.3 b/man/man3/tomo-Text.from_utf8.3 index ec5261ec..25ab2897 100644 --- a/man/man3/tomo-Text.from_utf8.3 +++ b/man/man3/tomo-Text.from_utf8.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.from_utf8 3 2025-09-21 "Tomo man-pages" +.TH Text.from_utf8 3 2025-11-29 "Tomo man-pages" .SH NAME Text.from_utf8 \- convert UTF8 byte list to text .SH LIBRARY @@ -34,3 +34,5 @@ The text will be normalized, so the resulting text's UTF8 bytes may not exactly .EX assert Text.from_utf8([195, 133, 107, 101]) == "Åke" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.has.3 b/man/man3/tomo-Text.has.3 index 75b6b0c9..a562b908 100644 --- a/man/man3/tomo-Text.has.3 +++ b/man/man3/tomo-Text.has.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.has 3 2025-09-21 "Tomo man-pages" +.TH Text.has 3 2025-11-29 "Tomo man-pages" .SH NAME Text.has \- check for substring .SH LIBRARY @@ -33,3 +33,5 @@ target Text The text to search for. - assert "hello world".has("wo") == yes assert "hello world".has("xxx") == no .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.join.3 b/man/man3/tomo-Text.join.3 index b736f721..d6b7d15a 100644 --- a/man/man3/tomo-Text.join.3 +++ b/man/man3/tomo-Text.join.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.join 3 2025-09-21 "Tomo man-pages" +.TH Text.join 3 2025-11-29 "Tomo man-pages" .SH NAME Text.join \- concatenate with separator .SH LIBRARY @@ -32,3 +32,5 @@ A single `Text` value with the pieces joined by the glue. .EX assert ", ".join(["one", "two", "three"]) == "one, two, three" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.left_pad.3 b/man/man3/tomo-Text.left_pad.3 index e79e4ad6..4a12fe82 100644 --- a/man/man3/tomo-Text.left_pad.3 +++ b/man/man3/tomo-Text.left_pad.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.left_pad 3 2025-09-21 "Tomo man-pages" +.TH Text.left_pad 3 2025-11-29 "Tomo man-pages" .SH NAME Text.left_pad \- left-pad text .SH LIBRARY @@ -35,3 +35,5 @@ Text with length at least `width`, with extra padding on the left as needed. If assert "x".left_pad(5) == " x" assert "x".left_pad(5, "ABC") == "ABCAx" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.lines.3 b/man/man3/tomo-Text.lines.3 index 60aa4430..2085d7d9 100644 --- a/man/man3/tomo-Text.lines.3 +++ b/man/man3/tomo-Text.lines.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.lines 3 2025-09-21 "Tomo man-pages" +.TH Text.lines 3 2025-11-29 "Tomo man-pages" .SH NAME Text.lines \- get list of lines .SH LIBRARY @@ -35,3 +35,5 @@ assert "one\[rs]ntwo\[rs]nthree\[rs]n\[rs]n".lines() == ["one", "two", "three", assert "one\[rs]r\[rs]ntwo\[rs]r\[rs]nthree\[rs]r\[rs]n".lines() == ["one", "two", "three"] assert "".lines() == [] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.lower.3 b/man/man3/tomo-Text.lower.3 index 877227e7..53563774 100644 --- a/man/man3/tomo-Text.lower.3 +++ b/man/man3/tomo-Text.lower.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.lower 3 2025-09-21 "Tomo man-pages" +.TH Text.lower 3 2025-11-29 "Tomo man-pages" .SH NAME Text.lower \- convert to lowercase .SH LIBRARY @@ -33,3 +33,5 @@ The lowercase version of the text. assert "AMÉLIE".lower() == "amélie" assert "I".lower(language="tr_TR") == "ı" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.middle_pad.3 b/man/man3/tomo-Text.middle_pad.3 index 8b57bf6e..601129f6 100644 --- a/man/man3/tomo-Text.middle_pad.3 +++ b/man/man3/tomo-Text.middle_pad.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.middle_pad 3 2025-09-21 "Tomo man-pages" +.TH Text.middle_pad 3 2025-11-29 "Tomo man-pages" .SH NAME Text.middle_pad \- pad text, centered .SH LIBRARY @@ -35,3 +35,5 @@ Text with length at least `width`, with extra padding on the left and right as n assert "x".middle_pad(6) == " x " assert "x".middle_pad(10, "ABC") == "ABCAxABCAB" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.quoted.3 b/man/man3/tomo-Text.quoted.3 index 8f6824fd..921b5c59 100644 --- a/man/man3/tomo-Text.quoted.3 +++ b/man/man3/tomo-Text.quoted.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.quoted 3 2025-09-21 "Tomo man-pages" +.TH Text.quoted 3 2025-11-29 "Tomo man-pages" .SH NAME Text.quoted \- add quotation marks and escapes .SH LIBRARY @@ -33,3 +33,5 @@ The text formatted as a quoted text. .EX assert "one\[rs]ntwo".quoted() == "\[rs]"one\[rs]\[rs]ntwo\[rs]"" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.repeat.3 b/man/man3/tomo-Text.repeat.3 index fdc9561f..70b49c03 100644 --- a/man/man3/tomo-Text.repeat.3 +++ b/man/man3/tomo-Text.repeat.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.repeat 3 2025-09-21 "Tomo man-pages" +.TH Text.repeat 3 2025-11-29 "Tomo man-pages" .SH NAME Text.repeat \- repeat text .SH LIBRARY @@ -32,3 +32,5 @@ The text repeated the given number of times. .EX assert "Abc".repeat(3) == "AbcAbcAbc" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.replace.3 b/man/man3/tomo-Text.replace.3 index 7a272106..7636fede 100644 --- a/man/man3/tomo-Text.replace.3 +++ b/man/man3/tomo-Text.replace.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.replace 3 2025-09-21 "Tomo man-pages" +.TH Text.replace 3 2025-11-29 "Tomo man-pages" .SH NAME Text.replace \- replace a substring .SH LIBRARY @@ -33,3 +33,5 @@ The text with occurrences of the target replaced. .EX assert "Hello world".replace("world", "there") == "Hello there" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.reversed.3 b/man/man3/tomo-Text.reversed.3 index 51b37acb..21b2be4e 100644 --- a/man/man3/tomo-Text.reversed.3 +++ b/man/man3/tomo-Text.reversed.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.reversed 3 2025-09-21 "Tomo man-pages" +.TH Text.reversed 3 2025-11-29 "Tomo man-pages" .SH NAME Text.reversed \- get a reversed copy .SH LIBRARY @@ -31,3 +31,5 @@ A reversed version of the text. .EX assert "Abc".reversed() == "cbA" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.right_pad.3 b/man/man3/tomo-Text.right_pad.3 index 0fb128cb..b91490f3 100644 --- a/man/man3/tomo-Text.right_pad.3 +++ b/man/man3/tomo-Text.right_pad.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.right_pad 3 2025-09-21 "Tomo man-pages" +.TH Text.right_pad 3 2025-11-29 "Tomo man-pages" .SH NAME Text.right_pad \- right-pad text .SH LIBRARY @@ -35,3 +35,5 @@ Text with length at least `width`, with extra padding on the right as needed. If assert "x".right_pad(5) == "x " assert "x".right_pad(5, "ABC") == "xABCA" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.slice.3 b/man/man3/tomo-Text.slice.3 index 48e0516a..ec7a160e 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-09-21 "Tomo man-pages" +.TH Text.slice 3 2025-11-29 "Tomo man-pages" .SH NAME Text.slice \- get a slice of a text .SH LIBRARY @@ -38,3 +38,5 @@ assert "hello".slice(2, 3) == "el" assert "hello".slice(to=-2) == "hell" assert "hello".slice(from=2) == "ello" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.split.3 b/man/man3/tomo-Text.split.3 index 8634c509..27ae13b1 100644 --- a/man/man3/tomo-Text.split.3 +++ b/man/man3/tomo-Text.split.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.split 3 2025-09-21 "Tomo man-pages" +.TH Text.split 3 2025-11-29 "Tomo man-pages" .SH NAME Text.split \- split a text by a delimiter .SH LIBRARY @@ -37,3 +37,5 @@ If an empty text is given as the delimiter, then each split will be the graphica assert "one,two,,three".split(",") == ["one", "two", "", "three"] assert "abc".split() == ["a", "b", "c"] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.split_any.3 b/man/man3/tomo-Text.split_any.3 index 6c77d8d6..4e30e5d5 100644 --- a/man/man3/tomo-Text.split_any.3 +++ b/man/man3/tomo-Text.split_any.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.split_any 3 2025-09-21 "Tomo man-pages" +.TH Text.split_any 3 2025-11-29 "Tomo man-pages" .SH NAME Text.split_any \- split a text by multiple delimiters .SH LIBRARY @@ -36,3 +36,5 @@ To split based on an exact delimiter, use Text.split(). .EX assert "one, two,,three".split_any(", ") == ["one", "two", "three"] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.starts_with.3 b/man/man3/tomo-Text.starts_with.3 index ac35fa8d..b8b870eb 100644 --- a/man/man3/tomo-Text.starts_with.3 +++ b/man/man3/tomo-Text.starts_with.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.starts_with 3 2025-09-21 "Tomo man-pages" +.TH Text.starts_with 3 2025-11-29 "Tomo man-pages" .SH NAME Text.starts_with \- check prefix .SH LIBRARY @@ -36,3 +36,5 @@ remainder : Text assert "hello world".starts_with("hello", &remainder) == yes assert remainder == " world" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.title.3 b/man/man3/tomo-Text.title.3 index d1b3e962..9b5b5245 100644 --- a/man/man3/tomo-Text.title.3 +++ b/man/man3/tomo-Text.title.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.title 3 2025-09-21 "Tomo man-pages" +.TH Text.title 3 2025-11-29 "Tomo man-pages" .SH NAME Text.title \- titlecase .SH LIBRARY @@ -35,3 +35,5 @@ assert "amélie".title() == "Amélie" # In Turkish, uppercase "i" is "İ" assert "i".title(language="tr_TR") == "İ" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.to.3 b/man/man3/tomo-Text.to.3 index 4de082d3..66fde6e1 100644 --- a/man/man3/tomo-Text.to.3 +++ b/man/man3/tomo-Text.to.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.to 3 2025-09-21 "Tomo man-pages" +.TH Text.to 3 2025-11-29 "Tomo man-pages" .SH NAME Text.to \- slice to an end index .SH LIBRARY @@ -36,3 +36,5 @@ A negative index counts backwards from the end of the text, so `-1` refers to th assert "goodbye".to(3) == "goo" assert "goodbye".to(-2) == "goodby" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.translate.3 b/man/man3/tomo-Text.translate.3 index 8cfeb3f7..fe944018 100644 --- a/man/man3/tomo-Text.translate.3 +++ b/man/man3/tomo-Text.translate.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.translate 3 2025-10-11 "Tomo man-pages" +.TH Text.translate 3 2025-11-29 "Tomo man-pages" .SH NAME Text.translate \- perform multiple replacements .SH LIBRARY @@ -39,3 +39,5 @@ text := "A <tag> & an amperand".translate({ }) assert text == "A <tag> & an ampersand" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.trim.3 b/man/man3/tomo-Text.trim.3 index b7daa310..1a2a8503 100644 --- a/man/man3/tomo-Text.trim.3 +++ b/man/man3/tomo-Text.trim.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.trim 3 2025-09-21 "Tomo man-pages" +.TH Text.trim 3 2025-11-29 "Tomo man-pages" .SH NAME Text.trim \- trim characters .SH LIBRARY @@ -36,3 +36,5 @@ assert " x y z \[rs]n".trim() == "x y z" assert "one,".trim(",") == "one" assert " xyz ".trim(right=no) == "xyz " .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.upper.3 b/man/man3/tomo-Text.upper.3 index dc10ff21..63d61bac 100644 --- a/man/man3/tomo-Text.upper.3 +++ b/man/man3/tomo-Text.upper.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.upper 3 2025-09-21 "Tomo man-pages" +.TH Text.upper 3 2025-11-29 "Tomo man-pages" .SH NAME Text.upper \- uppercase .SH LIBRARY @@ -35,3 +35,5 @@ assert "amélie".upper() == "AMÉLIE" # In Turkish, uppercase "i" is "İ" assert "i".upper(language="tr_TR") == "İ" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.utf16.3 b/man/man3/tomo-Text.utf16.3 index 2d5d0817..d8f00d22 100644 --- a/man/man3/tomo-Text.utf16.3 +++ b/man/man3/tomo-Text.utf16.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.utf16 3 2025-09-21 "Tomo man-pages" +.TH Text.utf16 3 2025-11-29 "Tomo man-pages" .SH NAME Text.utf16 \- get UTF16 codepoints .SH LIBRARY @@ -32,3 +32,5 @@ A list of 16-bit integer Unicode code points (`[Int16]`). assert "Åke".utf16() == [197, 107, 101] assert "こんにちは世界".utf16() == [12371, 12435, 12395, 12385, 12399, 19990, 30028] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.utf32.3 b/man/man3/tomo-Text.utf32.3 index a74b04d2..cf0d4a05 100644 --- a/man/man3/tomo-Text.utf32.3 +++ b/man/man3/tomo-Text.utf32.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.utf32 3 2025-09-21 "Tomo man-pages" +.TH Text.utf32 3 2025-11-29 "Tomo man-pages" .SH NAME Text.utf32 \- get UTF32 codepoints .SH LIBRARY @@ -31,3 +31,5 @@ A list of 32-bit integer Unicode code points (`[Int32]`). .EX assert "Amélie".utf32() == [65, 109, 233, 108, 105, 101] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.utf8.3 b/man/man3/tomo-Text.utf8.3 index e64bbaf1..05544cc1 100644 --- a/man/man3/tomo-Text.utf8.3 +++ b/man/man3/tomo-Text.utf8.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.utf8 3 2025-09-21 "Tomo man-pages" +.TH Text.utf8 3 2025-11-29 "Tomo man-pages" .SH NAME Text.utf8 \- get UTF8 bytes .SH LIBRARY @@ -31,3 +31,5 @@ A list of bytes (`[Byte]`) representing the text in UTF8 encoding. .EX assert "Amélie".utf8() == [65, 109, 195, 169, 108, 105, 101] .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.width.3 b/man/man3/tomo-Text.width.3 index 7118c9bb..00e32fcf 100644 --- a/man/man3/tomo-Text.width.3 +++ b/man/man3/tomo-Text.width.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.width 3 2025-09-21 "Tomo man-pages" +.TH Text.width 3 2025-11-29 "Tomo man-pages" .SH NAME Text.width \- get display width .SH LIBRARY @@ -35,3 +35,5 @@ This will not always be exactly accurate when your terminal's font rendering can assert "Amélie".width() == 6 assert "🤠".width() == 2 .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.without_prefix.3 b/man/man3/tomo-Text.without_prefix.3 index 12479791..43aa6e5e 100644 --- a/man/man3/tomo-Text.without_prefix.3 +++ b/man/man3/tomo-Text.without_prefix.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.without_prefix 3 2025-09-21 "Tomo man-pages" +.TH Text.without_prefix 3 2025-11-29 "Tomo man-pages" .SH NAME Text.without_prefix \- remove prefix .SH LIBRARY @@ -33,3 +33,5 @@ A text without the given prefix (if present) or the unmodified text if the prefi assert "foo:baz".without_prefix("foo:") == "baz" assert "qux".without_prefix("foo:") == "qux" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-Text.without_suffix.3 b/man/man3/tomo-Text.without_suffix.3 index 45d818a7..9b45d624 100644 --- a/man/man3/tomo-Text.without_suffix.3 +++ b/man/man3/tomo-Text.without_suffix.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Text.without_suffix 3 2025-09-21 "Tomo man-pages" +.TH Text.without_suffix 3 2025-11-29 "Tomo man-pages" .SH NAME Text.without_suffix \- remove suffix .SH LIBRARY @@ -33,3 +33,5 @@ A text without the given suffix (if present) or the unmodified text if the suffi assert "baz.foo".without_suffix(".foo") == "baz" assert "qux".without_suffix(".foo") == "qux" .EE +.SH SEE ALSO +.BR Tomo-Text (3) diff --git a/man/man3/tomo-ask.3 b/man/man3/tomo-ask.3 index 684efd63..76e06e8f 100644 --- a/man/man3/tomo-ask.3 +++ b/man/man3/tomo-ask.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH ask 3 2025-09-21 "Tomo man-pages" +.TH ask 3 2025-11-29 "Tomo man-pages" .SH NAME ask \- get user input .SH LIBRARY diff --git a/man/man3/tomo-at_cleanup.3 b/man/man3/tomo-at_cleanup.3 index a8dc04ed..d8d07faa 100644 --- a/man/man3/tomo-at_cleanup.3 +++ b/man/man3/tomo-at_cleanup.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH at_cleanup 3 2025-11-23 "Tomo man-pages" +.TH at_cleanup 3 2025-11-29 "Tomo man-pages" .SH NAME at_cleanup \- register a cleanup function .SH LIBRARY diff --git a/man/man3/tomo-exit.3 b/man/man3/tomo-exit.3 index 50c022b8..865d8b72 100644 --- a/man/man3/tomo-exit.3 +++ b/man/man3/tomo-exit.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH exit 3 2025-11-23 "Tomo man-pages" +.TH exit 3 2025-11-29 "Tomo man-pages" .SH NAME exit \- exit the program .SH LIBRARY diff --git a/man/man3/tomo-fail.3 b/man/man3/tomo-fail.3 index ed969cc4..b5f0b502 100644 --- a/man/man3/tomo-fail.3 +++ b/man/man3/tomo-fail.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH fail 3 2025-05-17 "Tomo man-pages" +.TH fail 3 2025-11-29 "Tomo man-pages" .SH NAME fail \- abort the program .SH LIBRARY diff --git a/man/man3/tomo-getenv.3 b/man/man3/tomo-getenv.3 index 84bef6be..6b4a7bbf 100644 --- a/man/man3/tomo-getenv.3 +++ b/man/man3/tomo-getenv.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH getenv 3 2025-10-11 "Tomo man-pages" +.TH getenv 3 2025-11-29 "Tomo man-pages" .SH NAME getenv \- get an environment variable .SH LIBRARY diff --git a/man/man3/tomo-print.3 b/man/man3/tomo-print.3 index ccb9863e..d6d2993f 100644 --- a/man/man3/tomo-print.3 +++ b/man/man3/tomo-print.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH print 3 2025-05-17 "Tomo man-pages" +.TH print 3 2025-11-29 "Tomo man-pages" .SH NAME print \- print some text .SH LIBRARY diff --git a/man/man3/tomo-say.3 b/man/man3/tomo-say.3 index 4e9bfeb4..7d40a88e 100644 --- a/man/man3/tomo-say.3 +++ b/man/man3/tomo-say.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH say 3 2025-05-17 "Tomo man-pages" +.TH say 3 2025-11-29 "Tomo man-pages" .SH NAME say \- print some text .SH LIBRARY diff --git a/man/man3/tomo-setenv.3 b/man/man3/tomo-setenv.3 index faa6a662..a2bc01dd 100644 --- a/man/man3/tomo-setenv.3 +++ b/man/man3/tomo-setenv.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH setenv 3 2025-11-27 "Tomo man-pages" +.TH setenv 3 2025-11-29 "Tomo man-pages" .SH NAME setenv \- set an environment variable .SH LIBRARY @@ -23,7 +23,7 @@ lb lb lbx lb l l l l. Name Type Description Default name Text The name of the environment variable to set. - -value Text? The new value of the environment variable. If `none`, then the environment variable will be unset. - +value Text? The new value of the environment variable. If \fBnone\fR, then the environment variable will be unset. - .TE .SH RETURN Nothing. diff --git a/man/man3/tomo-sleep.3 b/man/man3/tomo-sleep.3 index efe73c14..a652c6e8 100644 --- a/man/man3/tomo-sleep.3 +++ b/man/man3/tomo-sleep.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH sleep 3 2025-05-17 "Tomo man-pages" +.TH sleep 3 2025-11-29 "Tomo man-pages" .SH NAME sleep \- wait for an interval .SH LIBRARY |
