From 5bdf96234a388cbd3854747b0667620ebb60ccdf Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 18 Oct 2025 19:02:07 -0400 Subject: Improved CLI parsing and add CString.join() --- man/man3/tomo-CString.as_text.3 | 33 +++++++++++++++++++++++++++++++++ man/man3/tomo-CString.join.3 | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 man/man3/tomo-CString.as_text.3 create mode 100644 man/man3/tomo-CString.join.3 (limited to 'man/man3') diff --git a/man/man3/tomo-CString.as_text.3 b/man/man3/tomo-CString.as_text.3 new file mode 100644 index 00000000..463a6f98 --- /dev/null +++ b/man/man3/tomo-CString.as_text.3 @@ -0,0 +1,33 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH CString.as_text 3 2025-10-18 "Tomo man-pages" +.SH NAME +CString.as_text \- convert a C string to Text +.SH LIBRARY +Tomo Standard Library +.SH SYNOPSIS +.nf +.BI CString.as_text\ :\ func(str:\ CString\ ->\ Text) +.fi +.SH DESCRIPTION +Convert a C string to Text. + + +.SH ARGUMENTS + +.TS +allbox; +lb lb lbx lb +l l l l. +Name Type Description Default +str CString The C string. - +.TE +.SH RETURN +The C string as a Text. + +.SH EXAMPLES +.EX +assert CString("Hello").as_text() == "Hello" +.EE diff --git a/man/man3/tomo-CString.join.3 b/man/man3/tomo-CString.join.3 new file mode 100644 index 00000000..27e74495 --- /dev/null +++ b/man/man3/tomo-CString.join.3 @@ -0,0 +1,34 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH CString.join 3 2025-10-18 "Tomo man-pages" +.SH NAME +CString.join \- join a list of C strings +.SH LIBRARY +Tomo Standard Library +.SH SYNOPSIS +.nf +.BI CString.join\ :\ func(glue:\ CString,\ pieces:\ [CString]\ ->\ CString) +.fi +.SH DESCRIPTION +Join a list of C strings together with a separator. + + +.SH ARGUMENTS + +.TS +allbox; +lb lb lbx lb +l l l l. +Name Type Description Default +glue CString The C joiner used to between elements. - +pieces [CString] A list of C strings to join. - +.TE +.SH RETURN +A C string of the joined together bits. + +.SH EXAMPLES +.EX +assert CString(",").join([CString("a"), CString("b")]) == CString("a,b") +.EE -- cgit v1.2.3