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

strcasecmp.3p (3727B)


  1. '\" et
  2. .TH STRCASECMP "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. strcasecmp,
  12. strcasecmp_l,
  13. strncasecmp,
  14. strncasecmp_l
  15. \(em case-insensitive string comparisons
  16. .SH SYNOPSIS
  17. .LP
  18. .nf
  19. #include <strings.h>
  20. .P
  21. int strcasecmp(const char *\fIs1\fP, const char *\fIs2\fP);
  22. int strcasecmp_l(const char *\fIs1\fP, const char *\fIs2\fP,
  23. locale_t \fIlocale\fP);
  24. int strncasecmp(const char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP);
  25. int strncasecmp_l(const char *\fIs1\fP, const char *\fIs2\fP,
  26. size_t \fIn\fP, locale_t \fIlocale\fP);
  27. .fi
  28. .SH DESCRIPTION
  29. The
  30. \fIstrcasecmp\fR()
  31. and
  32. \fIstrcasecmp_l\fR()
  33. functions shall compare, while ignoring differences in case, the
  34. string pointed to by
  35. .IR s1
  36. to the string pointed to by
  37. .IR s2 .
  38. The
  39. \fIstrncasecmp\fR()
  40. and
  41. \fIstrncasecmp_l\fR()
  42. functions shall compare, while ignoring differences in case, not more
  43. than
  44. .IR n
  45. bytes from the string pointed to by
  46. .IR s1
  47. to the string pointed to by
  48. .IR s2 .
  49. .P
  50. The
  51. \fIstrcasecmp\fR()
  52. and
  53. \fIstrncasecmp\fR()
  54. functions use the current locale to determine the case of the characters.
  55. .P
  56. The
  57. \fIstrcasecmp_l\fR()
  58. and
  59. \fIstrncasecmp_l\fR()
  60. functions use the locale represented by
  61. .IR locale
  62. to determine the case of the characters.
  63. .P
  64. When the
  65. .IR LC_CTYPE
  66. category of the locale being used is from the POSIX locale, these
  67. functions shall behave as if the strings had been converted to lowercase
  68. and then a byte comparison performed. Otherwise, the results are
  69. unspecified.
  70. .P
  71. The behavior is undefined if the
  72. .IR locale
  73. argument to
  74. \fIstrcasecmp_l\fR()
  75. or
  76. \fIstrncasecmp_l\fR()
  77. is the special locale object LC_GLOBAL_LOCALE or is not a valid locale
  78. object handle.
  79. .SH "RETURN VALUE"
  80. Upon completion,
  81. \fIstrcasecmp\fR()
  82. and
  83. \fIstrcasecmp_l\fR()
  84. shall return an integer greater than, equal to, or less than 0, if the
  85. string pointed to by
  86. .IR s1
  87. is, ignoring case, greater than, equal to, or less than the string
  88. pointed to by
  89. .IR s2 ,
  90. respectively.
  91. .P
  92. Upon successful completion,
  93. \fIstrncasecmp\fR()
  94. and
  95. \fIstrncasecmp_l\fR()
  96. shall return an integer greater than, equal to, or less than 0, if the
  97. possibly null-terminated array pointed to by
  98. .IR s1
  99. is, ignoring case, greater than, equal to, or less than the possibly
  100. null-terminated array pointed to by
  101. .IR s2 ,
  102. respectively.
  103. .SH ERRORS
  104. No errors are defined.
  105. .LP
  106. .IR "The following sections are informative."
  107. .SH EXAMPLES
  108. None.
  109. .SH "APPLICATION USAGE"
  110. None.
  111. .SH RATIONALE
  112. None.
  113. .SH "FUTURE DIRECTIONS"
  114. None.
  115. .SH "SEE ALSO"
  116. .IR "\fIwcscasecmp\fR\^(\|)"
  117. .P
  118. The Base Definitions volume of POSIX.1\(hy2017,
  119. .IR "\fB<strings.h>\fP"
  120. .\"
  121. .SH COPYRIGHT
  122. Portions of this text are reprinted and reproduced in electronic form
  123. from IEEE Std 1003.1-2017, Standard for Information Technology
  124. -- Portable Operating System Interface (POSIX), The Open Group Base
  125. Specifications Issue 7, 2018 Edition,
  126. Copyright (C) 2018 by the Institute of
  127. Electrical and Electronics Engineers, Inc and The Open Group.
  128. In the event of any discrepancy between this version and the original IEEE and
  129. The Open Group Standard, the original IEEE and The Open Group Standard
  130. is the referee document. The original Standard can be obtained online at
  131. http://www.opengroup.org/unix/online.html .
  132. .PP
  133. Any typographical or formatting errors that appear
  134. in this page are most likely
  135. to have been introduced during the conversion of the source files to
  136. man page format. To report such errors, see
  137. https://www.kernel.org/doc/man-pages/reporting_bugs.html .