1 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   2 .\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .Dd "Jul 27, 2014"
   7 .Dt WSTRING 3C
   8 .Os
   9 .Sh NAME
  10 .Nm wstring ,
  11 .Nm wscasecmp ,
  12 .Nm wsncasecmp ,
  13 .Nm wsdup ,
  14 .Nm wslen ,
  15 .Nm wscol
  16 .Nd legacy wide-character string handling
  17 .Sh SYNOPSIS
  18 .In widec.h
  19 .Ft int
  20 .Fo wscasecmp
  21 .Fa "const wchar_t *s1"
  22 .Fa "const wchar_t *s2"
  23 .Fc
  24 .
  25 .Ft int
  26 .Fo wsncasecmp
  27 .Fa "const wchar_t *s1"
  28 .Fa "const wchar_t *s2"
  29 .Fa int n"
  30 .Fc
  31 .
  32 .Ft "wchar_t *"
  33 .Fo wsdup
  34 .Fa "const wchar_t *s"
  35 .Fc
  36 .
  37 .Ft int
  38 .Fo wscol
  39 .Fa "const wchar_t *s"
  40 .Fc
  41 .
  42 .Ft int
  43 .Fo wslen
  44 .Fa "const wchar_t *s"
  45 .Fc
  46 .
  47 .Sh DESCRIPTION
  48 These functions operate on wide-character strings. They are the historical
  49 functions for performing operation on such strings, and have been superseded
  50 by newer functions by various standards bodies.  As such, their use is
  51 deprecated and should be avoided in new applications.
  52 .Lp
  53 Wide-character strings
  54 .Fa s1 ,
  55 .Fa s2 ,
  56 and
  57 .Fa s
  58 used in these functions are terminated by
  59 null wide-characters.  None of these functions check for overflow
  60 conditions when appending to or copying strings.
  61 .
  62 .Ss Fn wscasecmp , wsncasecmp
  63 The
  64 .Fn wscasecmp
  65 and
  66 .Fn wsncasecmp
  67 functions compares their arguments, ignoring differences in case according
  68 to the current locale.  Whereas
  69 .Fn wscasecmp
  70 continues comparing the strings until either a difference is found,
  71 or the end of either string is reached, the
  72 .Fn wcsncasecmp
  73 function compares at most
  74 .Fa n
  75 wide-characters.
  76 .Lp
  77 The
  78 .Fn wscasecmp
  79 and
  80 .Fn wsncasecmp
  81 functions have been superseded by
  82 .Xr wcscasecmp 3C
  83 and
  84 .Xr wcsncasecmp 3C ,
  85 respectively, and behave identically to them.
  86 .Lp
  87 Note that for lexigraphic comparisions, the four Extended Unix Code (EUC)
  88 character sets are ordered from lowest to highest.
  89 .
  90 .Ss Fn wscol
  91 .
  92 The
  93 .Fn wscol
  94 function returns the width in screen columns required to display the
  95 wide-character string
  96 .Fa s .
  97 This function has been superseded by
  98 .Xr wcswidth
  99 and behaves similarily to it.
 100 .
 101 .Ss Fn wsdup
 102 .
 103 The
 104 .Fn wsdup
 105 returns a duplicate copy of the wide-character string
 106 .Fa s .
 107 This function has been superseded by
 108 .Xr wcsdup 3C ,
 109 and behaves identically to it.
 110 .
 111 .Ss Fn wslen
 112 .
 113 The
 114 .Fn wslen
 115 function returns the number of wide-characters in
 116 .Fa s ,
 117 excluding the terminating null wide-character code.  This function has been
 118 superseded by
 119 .Xr wcslen 3C ,
 120 and behaves identically to it.
 121 .
 122 .Sh INTERFACE STABILITY
 123 .Sy Obsolete Committed .
 124 .Sh MT-LEVEL
 125 .Sy MT-Safe .
 126 .Sh SEE ALSO
 127 .Xr malloc 3C ,
 128 .Xr string 3C ,
 129 .Xr wcstring 3C ,
 130 .Xr wcscasecmp 3C ,
 131 .Xr wcsdup 3C ,
 132 .Xr wcslen 3C ,
 133 .Xr wcsncasecmp 3C ,
 134 .Xr wcswidth 3C