xref: /openbsd-src/lib/libc/locale/wcsxfrm.3 (revision 8fb85c7dd161b84cedb801bc6bad9a6815edf9a1)
1*8fb85c7dSschwarze.\"	$OpenBSD: wcsxfrm.3,v 1.2 2019/01/18 07:43:36 schwarze Exp $
23a628b46Sschwarze.\"
33a628b46Sschwarze.\" Copyright (c) 1990, 1991 The Regents of the University of California.
43a628b46Sschwarze.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
53a628b46Sschwarze.\" All rights reserved.
63a628b46Sschwarze.\"
73a628b46Sschwarze.\" This code is derived from software contributed to Berkeley by
83a628b46Sschwarze.\" Chris Torek and the American National Standards Committee X3,
93a628b46Sschwarze.\" on Information Processing Systems.
103a628b46Sschwarze.\"
113a628b46Sschwarze.\" Redistribution and use in source and binary forms, with or without
123a628b46Sschwarze.\" modification, are permitted provided that the following conditions
133a628b46Sschwarze.\" are met:
143a628b46Sschwarze.\" 1. Redistributions of source code must retain the above copyright
153a628b46Sschwarze.\"    notice, this list of conditions and the following disclaimer.
163a628b46Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
173a628b46Sschwarze.\"    notice, this list of conditions and the following disclaimer in the
183a628b46Sschwarze.\"    documentation and/or other materials provided with the distribution.
193a628b46Sschwarze.\" 3. Neither the name of the University nor the names of its contributors
203a628b46Sschwarze.\"    may be used to endorse or promote products derived from this software
213a628b46Sschwarze.\"    without specific prior written permission.
223a628b46Sschwarze.\"
233a628b46Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
243a628b46Sschwarze.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
253a628b46Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
263a628b46Sschwarze.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
273a628b46Sschwarze.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
283a628b46Sschwarze.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
293a628b46Sschwarze.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
303a628b46Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
313a628b46Sschwarze.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
323a628b46Sschwarze.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
333a628b46Sschwarze.\" SUCH DAMAGE.
343a628b46Sschwarze.\"
35*8fb85c7dSschwarze.Dd $Mdocdate: January 18 2019 $
363a628b46Sschwarze.Dt WCSXFRM 3
373a628b46Sschwarze.Os
383a628b46Sschwarze.Sh NAME
393a628b46Sschwarze.Nm wcsxfrm ,
403a628b46Sschwarze.Nm wcsxfrm_l
413a628b46Sschwarze.Nd transform a wide string under locale
423a628b46Sschwarze.Sh SYNOPSIS
433a628b46Sschwarze.In wchar.h
443a628b46Sschwarze.Ft size_t
453a628b46Sschwarze.Fn wcsxfrm "wchar_t *dst" "const wchar_t *src" "size_t n"
463a628b46Sschwarze.Ft size_t
473a628b46Sschwarze.Fn wcsxfrm_l "wchar_t *dst" "const wchar_t *src" "size_t n" "locale_t locale"
483a628b46Sschwarze.Sh DESCRIPTION
493a628b46SschwarzeThe idea of
503a628b46Sschwarze.Fn wcsxfrm
513a628b46Sschwarzeand
523a628b46Sschwarze.Fn wcsxfrm_l
533a628b46Sschwarzeis to
543a628b46Sschwarze.Dq un-localize
553a628b46Sschwarzea wide string: the functions transform
563a628b46Sschwarze.Ar src ,
573a628b46Sschwarzestoring the result in
583a628b46Sschwarze.Ar dst ,
593a628b46Sschwarzesuch that
603a628b46Sschwarze.Xr wcscmp 3
613a628b46Sschwarzeon transformed wide strings returns what
623a628b46Sschwarze.Xr wcscoll 3
633a628b46Sschwarzeon the original untransformed wide strings would return.
643a628b46Sschwarze.Pp
653a628b46SschwarzeOn
663a628b46Sschwarze.Ox ,
673a628b46Sschwarzeboth have the same effect as
683a628b46Sschwarze.Xr wcslcpy 3 ,
693a628b46Sschwarzeand the global locale, the thread-specific locale, and the
703a628b46Sschwarze.Fa locale
713a628b46Sschwarzeargument are ignored.
72*8fb85c7dSschwarzeOn other operating systems, the behaviour may depend on the
733a628b46Sschwarze.Dv LC_CTYPE
74*8fb85c7dSschwarzeand
75*8fb85c7dSschwarze.Dv LC_COLLATE
76*8fb85c7dSschwarzelocale categories set with
77*8fb85c7dSschwarze.Xr setlocale 3 ,
78*8fb85c7dSschwarze.Xr uselocale 3 ,
79*8fb85c7dSschwarzeor
80*8fb85c7dSschwarze.Xr newlocale 3 .
813a628b46Sschwarze.Sh SEE ALSO
823a628b46Sschwarze.Xr newlocale 3 ,
833a628b46Sschwarze.Xr setlocale 3 ,
843a628b46Sschwarze.Xr wcscmp 3 ,
853a628b46Sschwarze.Xr wcscoll 3 ,
863a628b46Sschwarze.Xr wcslcpy 3
873a628b46Sschwarze.Sh STANDARDS
883a628b46SschwarzeThe
893a628b46Sschwarze.Fn wcsxfrm
903a628b46Sschwarzefunction conforms to
913a628b46Sschwarze.St -isoC-99 ,
923a628b46Sschwarzeand
933a628b46Sschwarze.Fn wcsxfrm_l
943a628b46Sschwarzeto
953a628b46Sschwarze.St -p1003.1-2008 .
963a628b46Sschwarze.Sh HISTORY
973a628b46SschwarzeThe
983a628b46Sschwarze.Fn wcsxfrm
993a628b46Sschwarzefunction has been available since
1003a628b46Sschwarze.Ox 4.8 ,
1013a628b46Sschwarzeand
1023a628b46Sschwarze.Fn wcsxfrm_l
1033a628b46Sschwarzesince
1043a628b46Sschwarze.Ox 6.2 .
105