Loading...
--- Libc/Libc-583/string/FreeBSD/wcswidth.3
+++ Libc/Libc-997.1.1/string/FreeBSD/wcswidth.3
@@ -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