logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

iswctype.3p (6132B)


  1. '\" et
  2. .TH ISWCTYPE "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. iswctype,
  12. iswctype_l
  13. \(em test character for a specified class
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <wctype.h>
  18. .P
  19. int iswctype(wint_t \fIwc\fP, wctype_t \fIcharclass\fP);
  20. int iswctype_l(wint_t \fIwc\fP, wctype_t \fIcharclass\fP,
  21. locale_t \fIlocale\fP);
  22. .fi
  23. .SH DESCRIPTION
  24. For
  25. \fIiswctype\fR():
  26. The functionality described on this reference page is aligned with the
  27. ISO\ C standard. Any conflict between the requirements described here and the
  28. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  29. .P
  30. The
  31. \fIiswctype\fR()
  32. and
  33. \fIiswctype_l\fR()
  34. functions shall determine whether the wide-character code
  35. .IR wc
  36. has the character class
  37. .IR charclass ,
  38. returning true or false. The
  39. \fIiswctype\fR()
  40. and
  41. \fIiswctype_l\fR()
  42. functions are defined on WEOF and wide-character codes corresponding to
  43. the valid character encodings in the current locale, or
  44. in the locale represented by
  45. .IR locale ,
  46. respectively. If the
  47. .IR wc
  48. argument is not in the domain of the function, the result is undefined.
  49. If the value of
  50. .IR charclass
  51. is invalid (that is, not obtained by a call to
  52. \fIwctype\fR()
  53. or
  54. .IR charclass
  55. is invalidated by a subsequent call to
  56. \fIsetlocale\fR()
  57. that has affected category
  58. .IR LC_CTYPE )
  59. the result is unspecified.
  60. .P
  61. The behavior is undefined if the
  62. .IR locale
  63. argument to
  64. \fIiswctype_l\fR()
  65. is the special locale object LC_GLOBAL_LOCALE or is not a valid locale
  66. object handle.
  67. .SH "RETURN VALUE"
  68. The
  69. \fIiswctype\fR()
  70. and
  71. \fIiswctype_l\fR()
  72. functions shall return non-zero (true) if and only if
  73. .IR wc
  74. has the property described by
  75. .IR charclass .
  76. If
  77. .IR charclass
  78. is (\c
  79. .BR wctype_t )0,
  80. these functions shall return 0.
  81. .SH ERRORS
  82. No errors are defined.
  83. .LP
  84. .IR "The following sections are informative."
  85. .SH EXAMPLES
  86. .SS "Testing for a Valid Character"
  87. .sp
  88. .RS 4
  89. .nf
  90. #include <wctype.h>
  91. \&...
  92. int yes_or_no;
  93. wint_t wc;
  94. wctype_t valid_class;
  95. \&...
  96. if ((valid_class=wctype("vowel")) == (wctype_t)0)
  97. /* Invalid character class. */
  98. yes_or_no=iswctype(wc,valid_class);
  99. .fi
  100. .P
  101. .RE
  102. .SH "APPLICATION USAGE"
  103. The twelve strings
  104. .BR \(dqalnum\(dq ,
  105. .BR \(dqalpha\(dq ,
  106. .BR \(dqblank\(dq ,
  107. .BR \(dqcntrl\(dq ,
  108. .BR \(dqdigit\(dq ,
  109. .BR \(dqgraph\(dq ,
  110. .BR \(dqlower\(dq ,
  111. .BR \(dqprint\(dq ,
  112. .BR \(dqpunct\(dq ,
  113. .BR \(dqspace\(dq ,
  114. .BR \(dqupper\(dq ,
  115. and
  116. .BR \(dqxdigit\(dq
  117. are reserved for the standard character classes. In the table below,
  118. the functions in the left column are equivalent to the functions in the
  119. right column.
  120. .sp
  121. .RS 4
  122. .nf
  123. iswalnum(\fIwc\fP) iswctype(\fIwc\fP, wctype("alnum"))
  124. iswalnum_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("alnum"), \fIlocale\fP)
  125. iswalpha(\fIwc\fP) iswctype(\fIwc\fP, wctype("alpha"))
  126. iswalpha_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("alpha"), \fIlocale\fP)
  127. iswblank(\fIwc\fP) iswctype(\fIwc\fP, wctype("blank"))
  128. iswblank_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("blank"), \fIlocale\fP)
  129. iswcntrl(\fIwc\fP) iswctype(\fIwc\fP, wctype("cntrl"))
  130. iswcntrl_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("cntrl"), \fIlocale\fP)
  131. iswdigit(\fIwc\fP) iswctype(\fIwc\fP, wctype("digit"))
  132. iswdigit_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("digit"), \fIlocale\fP)
  133. iswgraph(\fIwc\fP) iswctype(\fIwc\fP, wctype("graph"))
  134. iswgraph_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("graph"), \fIlocale\fP)
  135. iswlower(\fIwc\fP) iswctype(\fIwc\fP, wctype("lower"))
  136. iswlower_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("lower"), \fIlocale\fP)
  137. iswprint(\fIwc\fP) iswctype(\fIwc\fP, wctype("print"))
  138. iswprint_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("print"), \fIlocale\fP)
  139. iswpunct(\fIwc\fP) iswctype(\fIwc\fP, wctype("punct"))
  140. iswpunct_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("punct"), \fIlocale\fP)
  141. iswspace(\fIwc\fP) iswctype(\fIwc\fP, wctype("space"))
  142. iswspace_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("space"), \fIlocale\fP)
  143. iswupper(\fIwc\fP) iswctype(\fIwc\fP, wctype("upper"))
  144. iswupper_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("upper"), \fIlocale\fP)
  145. iswxdigit(\fIwc\fP) iswctype(\fIwc\fP, wctype("xdigit"))
  146. iswxdigit_l(\fIwc\fP, \fIlocale\fP) iswctype_l(\fIwc\fP, wctype("xdigit"), \fIlocale\fP)
  147. .fi
  148. .P
  149. .RE
  150. .SH RATIONALE
  151. None.
  152. .SH "FUTURE DIRECTIONS"
  153. None.
  154. .SH "SEE ALSO"
  155. .IR "\fIiswalnum\fR\^(\|)",
  156. .IR "\fIiswalpha\fR\^(\|)",
  157. .IR "\fIiswcntrl\fR\^(\|)",
  158. .IR "\fIiswdigit\fR\^(\|)",
  159. .IR "\fIiswgraph\fR\^(\|)",
  160. .IR "\fIiswlower\fR\^(\|)",
  161. .IR "\fIiswprint\fR\^(\|)",
  162. .IR "\fIiswpunct\fR\^(\|)",
  163. .IR "\fIiswspace\fR\^(\|)",
  164. .IR "\fIiswupper\fR\^(\|)",
  165. .IR "\fIiswxdigit\fR\^(\|)",
  166. .IR "\fIsetlocale\fR\^(\|)",
  167. .IR "\fIuselocale\fR\^(\|)",
  168. .IR "\fIwctype\fR\^(\|)"
  169. .P
  170. The Base Definitions volume of POSIX.1\(hy2017,
  171. .IR "\fB<locale.h>\fP",
  172. .IR "\fB<wctype.h>\fP"
  173. .\"
  174. .SH COPYRIGHT
  175. Portions of this text are reprinted and reproduced in electronic form
  176. from IEEE Std 1003.1-2017, Standard for Information Technology
  177. -- Portable Operating System Interface (POSIX), The Open Group Base
  178. Specifications Issue 7, 2018 Edition,
  179. Copyright (C) 2018 by the Institute of
  180. Electrical and Electronics Engineers, Inc and The Open Group.
  181. In the event of any discrepancy between this version and the original IEEE and
  182. The Open Group Standard, the original IEEE and The Open Group Standard
  183. is the referee document. The original Standard can be obtained online at
  184. http://www.opengroup.org/unix/online.html .
  185. .PP
  186. Any typographical or formatting errors that appear
  187. in this page are most likely
  188. to have been introduced during the conversion of the source files to
  189. man page format. To report such errors, see
  190. https://www.kernel.org/doc/man-pages/reporting_bugs.html .