--- _SB/Libc/string/FreeBSD/wcswidth.3 2003-05-20 15:23:56.000000000 -0700 +++ _SB/Libc/string/FreeBSD/wcswidth.3.edit 2006-06-28 16:55:53.000000000 -0700 @@ -28,14 +28,26 @@ .Dt WCSWIDTH 3 .Os .Sh NAME -.Nm wcswidth +.Nm wcswidth , +.Nm wcswidth_l .Nd "number of column positions in wide-character string" .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In wchar.h .Ft int -.Fn wcswidth "const wchar_t *pwcs" "size_t n" +.Fo wcswidth +.Fa "const wchar_t *pwcs" +.Fa "size_t n" +.Fc +.In wchar.h +.In xlocale.h +.Ft int +.Fo wcswidth_l +.Fa "const wchar_t *pwcs" +.Fa "size_t n" +.Fa "locale_t loc" +.Fc .Sh DESCRIPTION The .Fn wcswidth @@ -44,17 +56,26 @@ characters of .Fa pwcs , or until a null wide character (L'\e0') is encountered. +.Pp +Although the +.Fn wcswidth +function uses the current locale, the +.Fn wcswidth_l +function may be passed a locale directly. See +.Xr xlocale 3 +for more information. .Sh RETURN VALUES The .Fn wcswidth function returns 0 if .Fa pwcs is an empty string (L""), -\-1 if a non-printing wide character is encountered, -otherwise it returns the number of column positions occupied. +\-1 if a non-printing wide character is encountered; +otherwise, it returns the number of column positions occupied. .Sh SEE ALSO .Xr iswprint 3 , -.Xr wcwidth 3 +.Xr wcwidth 3 , +.Xr xlocale 3 .Sh STANDARDS The .Fn wcswidth