2024-02-01 20:41:57 -07:00
|
|
|
|
.\" Copyright (c) 2023–2024 DTB <trinity@trinity.moe>
|
2023-12-24 17:13:17 -07:00
|
|
|
|
.\" Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
|
|
|
|
|
.\"
|
|
|
|
|
.\" 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/>.
|
|
|
|
|
|
|
|
|
|
.TH STR 1
|
|
|
|
|
|
|
|
|
|
.SH NAME
|
|
|
|
|
|
|
|
|
|
str \(en test the character types of string arguments
|
|
|
|
|
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
|
|
|
|
|
str
|
|
|
|
|
.RB [ type ]
|
|
|
|
|
.RB [ string... ]
|
|
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
|
|
|
|
|
Str tests each character in an arbitrary quantity of string arguments against
|
|
|
|
|
the function of the same name within ctype(3).
|
|
|
|
|
|
|
|
|
|
.SH DIAGNOSTICS
|
|
|
|
|
|
|
|
|
|
Str exits successfully if all tests pass and unsuccessfully if a test failed.
|
|
|
|
|
.PP
|
|
|
|
|
Str will exit unsuccessfully if a string is empty, as none of its contents
|
|
|
|
|
passed the test.
|
|
|
|
|
.PP
|
|
|
|
|
Str will print a message to standard error and exit unsuccessfully if used
|
|
|
|
|
improperly.
|
|
|
|
|
|
|
|
|
|
.SH DEPRECATED FEATURES
|
|
|
|
|
|
|
|
|
|
Str used to have an "isvalue" type as an extension to ctype(3). This was
|
|
|
|
|
removed in favor of using strcmp(1) to compare strings against the empty string
|
|
|
|
|
('').
|
|
|
|
|
|
|
|
|
|
.SH BUGS
|
|
|
|
|
|
|
|
|
|
There's no way of knowing which argument failed the test without re-testing
|
|
|
|
|
arguments individually.
|
|
|
|
|
.PP
|
|
|
|
|
If a character in a string isn't valid ASCII str will exit unsuccessfully.
|
|
|
|
|
|
|
|
|
|
.SH AUTHOR
|
|
|
|
|
|
|
|
|
|
Written by DTB <trinity@trinity.moe>.
|
|
|
|
|
|
|
|
|
|
.SH COPYRIGHT
|
|
|
|
|
|
|
|
|
|
Copyright © 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later
|
|
|
|
|
<https://gnu.org/licenses/gpl.html>.
|
|
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
2024-02-01 20:41:57 -07:00
|
|
|
|
ctype(3p), strcmp(1), ascii(7)
|