Browse Source

from hubertf@netbsd:

Try to tell what this really does.
Including a BUGS section on why it doesn't.
*roff code by wiz@, with some input from
Slava Semushin <slava.semushin@gmail.com>
ok millert
OPENBSD_4_1
jmc 18 years ago
parent
commit
ce684f6c93
1 changed files with 18 additions and 6 deletions
  1. +18
    -6
      src/lib/libc/string/strxfrm.3

+ 18
- 6
src/lib/libc/string/strxfrm.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: strxfrm.3,v 1.5 2005/08/12 18:34:32 jmc Exp $
.\" $OpenBSD: strxfrm.3,v 1.6 2007/02/19 19:09:27 jmc Exp $
.\" .\"
.Dd June 29, 1991 .Dd June 29, 1991
.Dt STRXFRM 3 .Dt STRXFRM 3
@ -42,12 +42,19 @@
.Ft size_t .Ft size_t
.Fn strxfrm "char *dst" "const char *src" "size_t n" .Fn strxfrm "char *dst" "const char *src" "size_t n"
.Sh DESCRIPTION .Sh DESCRIPTION
The
The idea of
.Fn strxfrm .Fn strxfrm
function does something horrible (see
.Tn ANSI
standard).
In this implementation it just copies.
is to
.Dq un-localize
a string: the function transforms
.Ar src ,
storing the result in
.Ar dst ,
such that
.Xr strcmp 3
transformed strings return what
.Xr strcoll 3
on the original untransformed strings would return.
.Sh SEE ALSO .Sh SEE ALSO
.Xr bcmp 3 , .Xr bcmp 3 ,
.Xr memcmp 3 , .Xr memcmp 3 ,
@ -60,3 +67,8 @@ The
.Fn strxfrm .Fn strxfrm
function conforms to function conforms to
.St -ansiC . .St -ansiC .
.Sh BUGS
Since locales are not fully implemented on
.Ox ,
.Fn strxfrm
just returns a copy of the original string.

Loading…
Cancel
Save