1c8e80475STim J. Robbins.\" Copyright (c) 2002 Tim J. Robbins 2c8e80475STim J. Robbins.\" All rights reserved. 3c8e80475STim J. Robbins.\" 4c8e80475STim J. Robbins.\" Redistribution and use in source and binary forms, with or without 5c8e80475STim J. Robbins.\" modification, are permitted provided that the following conditions 6c8e80475STim J. Robbins.\" are met: 7c8e80475STim J. Robbins.\" 1. Redistributions of source code must retain the above copyright 8c8e80475STim J. Robbins.\" notice, this list of conditions and the following disclaimer. 9c8e80475STim J. Robbins.\" 2. Redistributions in binary form must reproduce the above copyright 10c8e80475STim J. Robbins.\" notice, this list of conditions and the following disclaimer in the 11c8e80475STim J. Robbins.\" documentation and/or other materials provided with the distribution. 12c8e80475STim J. Robbins.\" 13c8e80475STim J. Robbins.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14c8e80475STim J. Robbins.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15c8e80475STim J. Robbins.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16c8e80475STim J. Robbins.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17c8e80475STim J. Robbins.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18c8e80475STim J. Robbins.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19c8e80475STim J. Robbins.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20c8e80475STim J. Robbins.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21c8e80475STim J. Robbins.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22c8e80475STim J. Robbins.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23c8e80475STim J. Robbins.\" SUCH DAMAGE. 24c8e80475STim J. Robbins.\" 25fd779e01SRuslan Ermilov.Dd August 20, 2002 26c8e80475STim J. Robbins.Dt WCSWIDTH 3 27c8e80475STim J. Robbins.Os 28c8e80475STim J. Robbins.Sh NAME 29c8e80475STim J. Robbins.Nm wcswidth 30c8e80475STim J. Robbins.Nd "number of column positions in wide-character string" 31c8e80475STim J. Robbins.Sh LIBRARY 32c8e80475STim J. Robbins.Lb libc 33c8e80475STim J. Robbins.Sh SYNOPSIS 34c8e80475STim J. Robbins.In wchar.h 35c8e80475STim J. Robbins.Ft int 36c8e80475STim J. Robbins.Fn wcswidth "const wchar_t *pwcs" "size_t n" 37c8e80475STim J. Robbins.Sh DESCRIPTION 38c8e80475STim J. RobbinsThe 39c8e80475STim J. Robbins.Fn wcswidth 40c8e80475STim J. Robbinsfunction determines the number of column positions required for the first 41c8e80475STim J. Robbins.Fa n 42c8e80475STim J. Robbinscharacters of 43c8e80475STim J. Robbins.Fa pwcs , 44c8e80475STim J. Robbinsor until a null wide character (L'\e0') is encountered. 45c8e80475STim J. Robbins.Sh RETURN VALUES 46c8e80475STim J. RobbinsThe 47c8e80475STim J. Robbins.Fn wcswidth 48c8e80475STim J. Robbinsfunction returns 0 if 49c8e80475STim J. Robbins.Fa pwcs 50c8e80475STim J. Robbinsis an empty string (L""), 51fd779e01SRuslan Ermilov\-1 if a non-printing wide character is encountered, 52c8e80475STim J. Robbinsotherwise it returns the number of column positions occupied. 53c8e80475STim J. Robbins.Sh SEE ALSO 54c8e80475STim J. Robbins.Xr iswprint 3 , 55c8e80475STim J. Robbins.Xr wcwidth 3 56c8e80475STim J. Robbins.Sh STANDARDS 57c8e80475STim J. RobbinsThe 58c8e80475STim J. Robbins.Fn wcswidth 59c8e80475STim J. Robbinsfunction conforms to 60c8e80475STim J. Robbins.St -p1003.1-2001 . 61