summaryrefslogtreecommitdiff
path: root/usr/src/man/man3c/iswalpha.3c
blob: 1a85c701472ebf875459fb6363a4385bd72eac0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
.\"
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
.\" permission to reproduce portions of its copyrighted documentation.
.\" Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\"
.\" The Institute of Electrical and Electronics Engineers and The Open
.\" Group, have given us permission to reprint portions of their
.\" documentation.
.\"
.\" In the following statement, the phrase ``this text'' refers to portions
.\" of the system documentation.
.\"
.\" Portions of this text are reprinted and reproduced in electronic form
.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
.\" Standard for Information Technology -- Portable Operating System
.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
.\" between these versions and the original IEEE and The Open Group
.\" Standard, the original IEEE and The Open Group Standard is the referee
.\" document.  The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\"
.\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
.\" Portions Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved.
.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\"
.TH ISWALPHA 3C "April 9, 2016"
.SH NAME
iswalpha, isenglish, isideogram, iswideogram, isnumber, iswnumber,
isphonogram, iswphonogram, isspecial, iswspecial, iswalnum, iswascii,
iswblank, iswcntrl, iswdigit, iswgraph, iswlower, iswprint, iswpunct,
iswspace, iswupper, iswxdigit, iswhexnumber, iswalpha_l, iswideogram_l,
iswnumber_l, iswphonogram_l, iswspecial_l, iswalnum_l, iswascii_l,
iswblank_l, iswcntrl_l, iswdigit_l, iswgraph_l, iswlower_l, iswprint_l,
iswpunct_l, iswspace_l, iswupper_l, iswhexnumber_l \- wide-character
code classification functions

.SH SYNOPSIS
.LP
.nf
#include <wchar.h>
#include <wctype.h>

\fBint\fR \fBiswalpha\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBisenglish\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBisideogram\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBisnumber\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBisphonogram\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBisspecial\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswalnum\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswascii\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswblank\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswcntrl\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswdigit\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswgraph\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswlower\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswprint\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswpunct\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswspace\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswupper\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswxdigit\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswhexnumber\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswideogram\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswnumber\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswphonogram\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswspecial\fR(\fBwint_t\fR \fIwc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswalpha_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswideogram_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswnumber_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswphonogram_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswspecial_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswalnum_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswascii_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswblank_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswcntrl_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswdigit_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswgraph_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswlower_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswprint_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswpunct_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswspace_l\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswupper\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
\fBint\fR \fBiswxdigit\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.LP
.nf
#include <xlocale.h>

\fBint\fR \fBiswhexnumber\fR(\fBwint_t\fR \fIwc\fR, \fBlocale_t\fR \fIloc\fR);
.fi

.SH DESCRIPTION
.LP
These functions test whether \fIwc\fR is a wide-character code representing a
character of a particular class defined in the \fBLC_CTYPE\fR category of the
current locale or the locale specified by \fIloc\fR.
.LP
The functions \fBiswalpha_l()\fR, \fBiswideogram_l()\fR, \fBiswnumber_l()\fR,
\fBiswphonogram_l()\fR, \fBiswspecial_l()\fR, \fBiswalnum_l()\fR,
\fBiswascii_l()\fR, \fBiswblank_l()\fR, \fBiswcntrl_l()\fR, \fBiswdigit_l()\fR,
\fBiswgraph_l()\fR, \fBiswlower_l()\fR, \fBiswprint_l()\fR, \fBiswpunct_l()\fR,
\fBiswspace_l()\fR, \fBiswupper_l()\fR, all behave identically to their
counterparts without the '\fB_l\fR' suffix, but instead of operating on the
current locale, they operate on the locale specified by \fIloc\fR.
.LP
The functions, \fBiswideogram()\fR, \fBiswnumber()\fR, \fBiswphonogram()\fR,
\fBiswspecial()\fR, and \fBiswhexnumber()\fR, are respectively identical to
\fBisideogram()\fR, \fBisnumber()\fR, \fBisphonogram()\fR, \fBisspecial()\fR,
\fBiswxdigit()\fR respectively.  They are provided for compatibility purposes.
.LP
In all cases, \fIwc\fR is a \fBwint_t\fR, the value of which must be a
wide-character code corresponding to a valid character in the current locale or
must equal the value of the macro \fBWEOF\fR. If the argument has any other
values, the behavior is undefined.
.sp
.ne 2
.na
\fB\fBiswalpha(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "alpha" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBisenglish(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing an English
language character, excluding \fBASCII\fR characters.
.RE

.sp
.ne 2
.na
\fB\fBisideogram(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing an ideographic
language character, excluding \fBASCII\fR characters.
.RE

.sp
.ne 2
.na
\fB\fBisnumber(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing digit [0\(mi9],
excluding \fBASCII\fR characters.
.RE

.sp
.ne 2
.na
\fB\fBisphonogram(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a phonetic
language character, excluding \fBASCII\fR characters.
.RE

.sp
.ne 2
.na
\fB\fBisspecial(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a special language
character, excluding \fBASCII\fR characters.
.RE

.sp
.ne 2
.na
\fB\fBiswalnum(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "alpha" or "digit" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswascii(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing an \fBASCII\fR
character.
.RE

.sp
.ne 2
.na
\fB\fBiswblank(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "blank" in the program's current locale. This function is not available
to applications conforming to standards prior to SUSv3. See \fBstandards\fR(5).
.RE

.sp
.ne 2
.na
\fB\fBiswlower(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "lower" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswcntrl(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "cntrl" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswdigit(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "digit" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswgraph(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "graph" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswprint(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "print" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswpunct(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "punct" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswspace(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "space" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswupper(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "upper" in the program's current locale.
.RE

.sp
.ne 2
.na
\fB\fBiswxdigit(\fR\fIwc\fR\fB)\fR\fR
.ad
.RS 19n
Tests whether \fIwc\fR is a wide-character code representing a character of
class "xdigit" in the program's current locale.
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	See below.
_
MT-Level	MT-Safe
.TE

.LP
The \fBiswalpha()\fR, \fBiswalnum()\fR, \fBiswblank()\fR, \fBiswcntrl()\fR,
\fBiswdigit()\fR, \fBiswgraph()\fR, \fBiswlower()\fR, \fBiswprint()\fR,
\fBiswpunct()\fR, \fBiswspace()\fR, \fBiswupper()\fR, and \fBiswxdigit()\fR
functions are Standard.
.LP
The \fBiswalpha_l()\fR, \fBiswalnum_l()\fR, \fBiswblank_l()\fR, \fBiswcntrl_l()\fR,
\fBiswdigit_l()\fR, \fBiswgraph_l()\fR, \fBiswlower_l()\fR, \fBiswprint_l()\fR,
\fBiswpunct_l()\fR, \fBiswspace_l()\fR, and \fBiswupper_l()\fR
functions are Standard.
.SH SEE ALSO
.LP
\fBlocaledef\fR(1), \fBnewlocale\fR(3C),
\fBsetlocale\fR(3C), \fBstdio\fR(3C), \fBuselocale\fR(3C),
\fBascii\fR(5), \fBattributes\fR(5), \fBstandards\fR(5)