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

islower.3p (4428B)


  1. '\" et
  2. .TH ISLOWER "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. islower,
  12. islower_l
  13. \(em test for a lowercase letter
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <ctype.h>
  18. .P
  19. int islower(int \fIc\fP);
  20. int islower_l(int \fIc\fP, locale_t \fIlocale\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. For
  24. \fIislower\fR():
  25. The functionality described on this reference page is aligned with the
  26. ISO\ C standard. Any conflict between the requirements described here and the
  27. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  28. .P
  29. The
  30. \fIislower\fR()
  31. and
  32. \fIislower_l\fR()
  33. functions shall test whether
  34. .IR c
  35. is a character of class
  36. .BR lower
  37. in the current locale,
  38. or in the locale represented by
  39. .IR locale ,
  40. respectively; see the Base Definitions volume of POSIX.1\(hy2017,
  41. .IR "Chapter 7" ", " "Locale".
  42. .P
  43. The
  44. .IR c
  45. argument is an
  46. .BR int ,
  47. the value of which the application shall ensure is a character
  48. representable as an
  49. .BR "unsigned char"
  50. or equal to the value of the macro EOF. If the argument has any other
  51. value, the behavior is undefined.
  52. .P
  53. The behavior is undefined if the
  54. .IR locale
  55. argument to
  56. \fIislower_l\fR()
  57. is the special locale object LC_GLOBAL_LOCALE or is not a valid locale
  58. object handle.
  59. .SH "RETURN VALUE"
  60. The
  61. \fIislower\fR()
  62. and
  63. \fIislower_l\fR()
  64. functions shall return non-zero if
  65. .IR c
  66. is a lowercase letter; otherwise, they shall return 0.
  67. .SH ERRORS
  68. No errors are defined.
  69. .LP
  70. .IR "The following sections are informative."
  71. .SH EXAMPLES
  72. .SS "Testing for a Lowercase Letter"
  73. .P
  74. Two examples follow, the first using
  75. \fIislower\fR(),
  76. the second using multiple concurrent locales and
  77. \fIislower_l\fR().
  78. .P
  79. The examples test whether the value is a lowercase letter,
  80. based on the current locale, then use it as part of a key value.
  81. .sp
  82. .RS 4
  83. .nf
  84. /* Example 1 -- using islower() */
  85. #include <ctype.h>
  86. #include <stdlib.h>
  87. #include <locale.h>
  88. \&...
  89. char *keystr;
  90. int elementlen, len;
  91. unsigned char c;
  92. \&...
  93. setlocale(LC_ALL, "");
  94. \&...
  95. len = 0;
  96. while (len < elementlen) {
  97. c = (unsigned char) (rand() % 256);
  98. \&...
  99. if (islower(c))
  100. keystr[len++] = c;
  101. }
  102. \&...
  103. .P
  104. /* Example 2 -- using islower_l() */
  105. #include <ctype.h>
  106. #include <stdlib.h>
  107. #include <locale.h>
  108. \&...
  109. char *keystr;
  110. int elementlen, len;
  111. unsigned char c;
  112. \&...
  113. locale_t loc = newlocale (LC_ALL_MASK, "", (locale_t) 0);
  114. \&...
  115. len = 0;
  116. while (len < elementlen) {
  117. c = (unsigned char) (rand() % 256);
  118. \&...
  119. if (islower_l(c, loc))
  120. keystr[len++] = c;
  121. }
  122. \&...
  123. .fi
  124. .P
  125. .RE
  126. .SH "APPLICATION USAGE"
  127. To ensure applications portability, especially across natural
  128. languages, only these functions and the functions in the reference pages
  129. listed in the SEE ALSO section should be used for character classification.
  130. .SH RATIONALE
  131. None.
  132. .SH "FUTURE DIRECTIONS"
  133. None.
  134. .SH "SEE ALSO"
  135. .IR "\fIisalnum\fR\^(\|)",
  136. .IR "\fIisalpha\fR\^(\|)",
  137. .IR "\fIisblank\fR\^(\|)",
  138. .IR "\fIiscntrl\fR\^(\|)",
  139. .IR "\fIisdigit\fR\^(\|)",
  140. .IR "\fIisgraph\fR\^(\|)",
  141. .IR "\fIisprint\fR\^(\|)",
  142. .IR "\fIispunct\fR\^(\|)",
  143. .IR "\fIisspace\fR\^(\|)",
  144. .IR "\fIisupper\fR\^(\|)",
  145. .IR "\fIisxdigit\fR\^(\|)",
  146. .IR "\fIsetlocale\fR\^(\|)",
  147. .IR "\fIuselocale\fR\^(\|)"
  148. .P
  149. The Base Definitions volume of POSIX.1\(hy2017,
  150. .IR "Chapter 7" ", " "Locale",
  151. .IR "\fB<ctype.h>\fP",
  152. .IR "\fB<locale.h>\fP"
  153. .\"
  154. .SH COPYRIGHT
  155. Portions of this text are reprinted and reproduced in electronic form
  156. from IEEE Std 1003.1-2017, Standard for Information Technology
  157. -- Portable Operating System Interface (POSIX), The Open Group Base
  158. Specifications Issue 7, 2018 Edition,
  159. Copyright (C) 2018 by the Institute of
  160. Electrical and Electronics Engineers, Inc and The Open Group.
  161. In the event of any discrepancy between this version and the original IEEE and
  162. The Open Group Standard, the original IEEE and The Open Group Standard
  163. is the referee document. The original Standard can be obtained online at
  164. http://www.opengroup.org/unix/online.html .
  165. .PP
  166. Any typographical or formatting errors that appear
  167. in this page are most likely
  168. to have been introduced during the conversion of the source files to
  169. man page format. To report such errors, see
  170. https://www.kernel.org/doc/man-pages/reporting_bugs.html .