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

strxfrm.3p (4245B)


  1. '\" et
  2. .TH STRXFRM "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. strxfrm,
  12. strxfrm_l
  13. \(em string transformation
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <string.h>
  18. .P
  19. size_t strxfrm(char *restrict \fIs1\fP, const char *restrict \fIs2\fP, size_t \fIn\fP);
  20. size_t strxfrm_l(char *restrict \fIs1\fP, const char *restrict \fIs2\fP,
  21. size_t \fIn\fP, locale_t \fIlocale\fP);
  22. .fi
  23. .SH DESCRIPTION
  24. For
  25. \fIstrxfrm\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. \fIstrxfrm\fR()
  32. and
  33. \fIstrxfrm_l\fR()
  34. functions shall transform the string pointed to by
  35. .IR s2
  36. and place the resulting string into the array pointed to by
  37. .IR s1 .
  38. The transformation is such that if
  39. \fIstrcmp\fR()
  40. is applied to two transformed strings, it shall return a value greater
  41. than, equal to, or less than 0, corresponding to the result of
  42. \fIstrcoll\fR()
  43. or
  44. \fIstrcoll_l\fR(),
  45. respectively, applied to the same two original strings
  46. with the same locale.
  47. No more than
  48. .IR n
  49. bytes are placed into the resulting array pointed to by
  50. .IR s1 ,
  51. including the terminating NUL character. If
  52. .IR n
  53. is 0,
  54. .IR s1
  55. is permitted to be a null pointer. If copying takes place between
  56. objects that overlap, the behavior is undefined.
  57. .P
  58. The
  59. \fIstrxfrm\fR()
  60. and
  61. \fIstrxfrm_l\fR()
  62. functions shall not change the setting of
  63. .IR errno
  64. if successful.
  65. .P
  66. Since no return value is reserved to indicate an error, an
  67. application wishing to check for error situations should set
  68. .IR errno
  69. to 0, then call
  70. \fIstrxfrm\fR()
  71. or
  72. \fIstrxfrm_l\fR(),
  73. then check
  74. .IR errno .
  75. .P
  76. The behavior is undefined if the
  77. .IR locale
  78. argument to
  79. \fIstrxfrm_l\fR()
  80. is the special locale object LC_GLOBAL_LOCALE or is not a valid locale
  81. object handle.
  82. .SH "RETURN VALUE"
  83. Upon successful completion,
  84. \fIstrxfrm\fR()
  85. and
  86. \fIstrxfrm_l\fR()
  87. shall return the length of the transformed string (not including the
  88. terminating NUL character). If the value returned is
  89. .IR n
  90. or more, the contents of the array pointed to by
  91. .IR s1
  92. are unspecified.
  93. .P
  94. On error,
  95. \fIstrxfrm\fR()
  96. and
  97. \fIstrxfrm_l\fR()
  98. may set
  99. .IR errno
  100. but no return value is reserved to indicate an error.
  101. .SH ERRORS
  102. These functions may fail if:
  103. .TP
  104. .BR EINVAL
  105. The string pointed to by the
  106. .IR s2
  107. argument contains characters outside the domain of the collating
  108. sequence.
  109. .LP
  110. .IR "The following sections are informative."
  111. .SH EXAMPLES
  112. None.
  113. .SH "APPLICATION USAGE"
  114. The transformation function is such that two transformed strings can be
  115. ordered by
  116. \fIstrcmp\fR()
  117. as appropriate to collating sequence information in the
  118. current locale (category
  119. .IR LC_COLLATE ).
  120. .P
  121. The fact that when
  122. .IR n
  123. is 0
  124. .IR s1
  125. is permitted to be a null pointer is useful to determine the size of
  126. the
  127. .IR s1
  128. array prior to making the transformation.
  129. .SH RATIONALE
  130. None.
  131. .SH "FUTURE DIRECTIONS"
  132. None.
  133. .SH "SEE ALSO"
  134. .IR "\fIstrcmp\fR\^(\|)",
  135. .IR "\fIstrcoll\fR\^(\|)"
  136. .P
  137. The Base Definitions volume of POSIX.1\(hy2017,
  138. .IR "\fB<string.h>\fP"
  139. .\"
  140. .SH COPYRIGHT
  141. Portions of this text are reprinted and reproduced in electronic form
  142. from IEEE Std 1003.1-2017, Standard for Information Technology
  143. -- Portable Operating System Interface (POSIX), The Open Group Base
  144. Specifications Issue 7, 2018 Edition,
  145. Copyright (C) 2018 by the Institute of
  146. Electrical and Electronics Engineers, Inc and The Open Group.
  147. In the event of any discrepancy between this version and the original IEEE and
  148. The Open Group Standard, the original IEEE and The Open Group Standard
  149. is the referee document. The original Standard can be obtained online at
  150. http://www.opengroup.org/unix/online.html .
  151. .PP
  152. Any typographical or formatting errors that appear
  153. in this page are most likely
  154. to have been introduced during the conversion of the source files to
  155. man page format. To report such errors, see
  156. https://www.kernel.org/doc/man-pages/reporting_bugs.html .