Fix bugs reported by Fengjing Xiao
[clqr.git] / clqr-characters.tex
blobc8ee550ef6cc94127b65632261e58fed45548262
1 % Copyright (C) 2008, 2010, 2011, 2014, 2018 Bert Burgemeister
3 % Permission is granted to copy, distribute and/or modify this
4 % document under the terms of the GNU Free Documentation License,
5 % Version 1.2; with no Invariant Sections, no Front-Cover Texts and
6 % no Back-Cover Texts. For details see file COPYING.
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10 \section{Characters}
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 The \kwd*{standard-char} type comprises \LIT{a}-\LIT{z},
14 \LIT{A}-\LIT{Z}, \LIT{0}-\LIT{9}, \LIT{Newline}, \LIT{Space}, and
15 \LIT{!?\$"'`.:,;*+-/|{\char`\\}\TLD\_\^{}<=>\#\%@\&()[]\{\}}.
16 \index{NEWLINE}\index{SPACE}
18 \begin{LIST}{1cm}
20 \IT{\arrGOO{(\FU*{CHARACTERP} \VAR{ foo})\\
21 (\FU*{STANDARD-CHAR-P} \VAR{ char})}{.}}
23 \retval{\T} if argument is of indicated type.
26 \IT{\arrGOO{(\FU*{GRAPHIC-CHAR-P} \VAR{ character})\\
27 (\FU*{ALPHA-CHAR-P} \VAR{ character})\\
28 (\FU*{ALPHANUMERICP} \VAR{ character})}{.}}
30 \retval{\T} if \VAR{character} is visible, alphabetic, or
31 alphanumeric, respectively.
34 \IT{\arrGOO{(\FU*{UPPER-CASE-P} \VAR{ character})\\
35 (\FU*{LOWER-CASE-P} \VAR{ character})\\
36 (\FU*{BOTH-CASE-P} \VAR{ character})}{.}}
38 Return \retval{\T} if \VAR{character} is uppercase, lowercase, or
39 able to be in another case, respectively.
42 \IT{(\FU*{DIGIT-CHAR-P} \VAR{character}
43 \Op{\VAR{radix}\DF{\LIT{10}}})}
45 Return \retval{its weight} if \VAR{character} is a digit, or
46 \retval{\NIL} otherwise.
49 \IT{\arrGOO{(\FU*{CHAR=}\RP{\VAR{
50 character}})\\(\FU*{CHAR/=}\RP{\VAR{
51 character}})}{.}}
53 Return \retval{\T} if all \VAR{character}s, or
54 none, respectively, are equal.
57 \IT{\arrGOO{(\FU*{CHAR-EQUAL}\RP{\VAR{
58 character}})\\(\FU*{CHAR-NOT-EQUAL}\RP{\VAR{
59 character}})}{.}}
61 Return \retval{\T} if all \VAR{character}s, or
62 none, respectively, are equal ignoring case.
65 \IT{\arrGOO{(\FU{CHAR\boldmath$>$}\RP{\VAR{
66 character}})\\(\FU{CHAR\boldmath$>$=}\RP{\VAR{
67 character}})\\(\FU{CHAR\boldmath$<$}\RP{\VAR{
68 character}})\\(\FU{CHAR\boldmath$<$=}\RP{\VAR{
69 character}})}{.}}
71 \index{CHAR>@CHAR$>$}%
72 \index{CHAR>=@CHAR$>$=}%
73 \index{CHAR<@CHAR$<$}%
74 \index{CHAR<=@CHAR$<$=}%
75 Return \retval{\T} if \VAR{character}s are
76 monotonically decreasing, monotonically non-increasing, monotonically
77 increasing, or monotonically non-decreasing, respectively.
80 \IT{\arrGOO{
81 (\FU*{CHAR-GREATERP}\RP{\VAR{ character}})\\
82 (\FU*{CHAR-NOT-LESSP}\RP{\VAR{ character}})\\
83 (\FU*{CHAR-LESSP}\RP{\VAR{ character}})\\
84 (\FU*{CHAR-NOT-GREATERP}\RP{\VAR{ character}})}{.}}
86 Return \retval{\T} if \VAR{character}s are monotonically
87 decreasing, monotonically non-increasing, monotonically
88 increasing, or monotonically non-decreasing, respectively,
89 ignoring case.
92 \IT{\arrGOO{(\FU*{CHAR-UPCASE} \VAR{ character})\\
93 (\FU*{CHAR-DOWNCASE} \VAR{ character})}{.}}
95 Return corresponding uppercase/lowercase \retval{character},
96 respectively.
99 \IT{(\FU*{DIGIT-CHAR} \VAR{i} \Op{\VAR{radix}\DF{\LIT{10}}})}
101 \retval{Character} representing digit \VAR{i}.
104 \IT{(\FU*{CHAR-NAME} \VAR{char})}
106 \VAR{char}'s \retval{name} if any, or
107 \retval{\NIL}.
110 \IT{(\FU*{NAME-CHAR} \VAR{foo})\qquad\qquad}
112 \retval{Character} named \VAR{foo} if any, or
113 \retval{\NIL}.
116 \IT{\arrGOO{(\FU*{CHAR-INT} \VAR{ character})\\
117 (\FU*{CHAR-CODE} \VAR{ character})}{.}}
119 \retval{Code} of \VAR{character}.
122 \IT{(\FU*{CODE-CHAR} \VAR{code})\qquad\qquad}
124 \retval{Character} with \VAR{code}.
127 \IT{\CNS*{CHAR-CODE-LIMIT}}
129 Upper bound of (\FU{CHAR-CODE} \VAR{char}); $\geq 96$.
132 \IT{(\FU*{CHARACTER} \VAR{c})}
134 Return \retval{\kwd{\#$\backslash$}\VAR{c}}.
137 \end{LIST}
139 %%% Local Variables:
140 %%% mode: latex
141 %%% TeX-master: "clqr"
142 %%% End: