2024-02-02 03:41:57 +00:00
|
|
|
|
.\" Copyright (c) 2023–2024 DTB <trinity@trinity.moe>
|
2024-03-27 00:26:51 +00:00
|
|
|
|
.\" Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.\"
|
|
|
|
|
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
|
|
|
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2024-06-06 19:32:54 +00:00
|
|
|
|
.TH STR 1 2024-06-06 "Bonsai Core Utilites 0.13.8"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH NAME
|
|
|
|
|
str \(en test the character types of string arguments
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH SYNOPSIS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2023-12-25 00:13:17 +00:00
|
|
|
|
str
|
|
|
|
|
.RB [ type ]
|
|
|
|
|
.RB [ string... ]
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH DESCRIPTION
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-03-27 06:16:51 +00:00
|
|
|
|
Test string arguments.
|
2024-03-27 01:22:30 +00:00
|
|
|
|
|
|
|
|
|
The tests in this program are equivalent to the functions with the same names in
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.BR ctype.h (0p)
|
|
|
|
|
and are the methods by which string arguments are tested.
|
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH DIAGNOSTICS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
|
If all tests pass, the program will exit with an exit code of 0. If any of the
|
|
|
|
|
tests fail, the program will exit unsuccessfully with an error code of 1.
|
2024-03-27 00:26:51 +00:00
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
|
An empty string will cause an unsuccessful exit as none of its contents pass any
|
|
|
|
|
tests.
|
2024-03-27 00:26:51 +00:00
|
|
|
|
|
2024-03-27 01:22:30 +00:00
|
|
|
|
When invoked incorrectly, a debug message will be printed and the program will
|
2024-06-04 22:11:33 +00:00
|
|
|
|
exit with the appropriate
|
|
|
|
|
.BR sysexits.h (3)
|
|
|
|
|
error code.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
|
|
|
|
.SH CAVEATS
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-06-04 22:11:33 +00:00
|
|
|
|
There\(cqs no way of knowing which argument failed the test without re-testing
|
2023-12-25 00:13:17 +00:00
|
|
|
|
arguments individually.
|
2024-03-27 00:26:51 +00:00
|
|
|
|
|
2024-06-06 05:07:15 +00:00
|
|
|
|
If a character in a string isn\(cqt valid ASCII, the program will exit
|
2024-06-04 22:11:33 +00:00
|
|
|
|
unsuccessfully.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH AUTHOR
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-06-03 00:47:14 +00:00
|
|
|
|
Written by DTB
|
|
|
|
|
.MT trinity@trinity.moe
|
|
|
|
|
.ME .
|
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH COPYRIGHT
|
2024-06-04 05:07:19 +00:00
|
|
|
|
|
2024-06-04 22:11:33 +00:00
|
|
|
|
Copyright \(co 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later
|
2023-12-25 00:13:17 +00:00
|
|
|
|
<https://gnu.org/licenses/gpl.html>.
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.\"
|
2023-12-25 00:13:17 +00:00
|
|
|
|
.SH SEE ALSO
|
2024-06-03 00:47:14 +00:00
|
|
|
|
.BR ctype (3p),
|
|
|
|
|
.BR strcmp(1),
|
|
|
|
|
.BR ascii(7)
|