Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wcswidth(3c) [sunos man page]

wcswidth(3C)						   Standard C Library Functions 					      wcswidth(3C)

NAME
wcswidth - number of column positions of a wide-character string SYNOPSIS
#include <wchar.h> int wcswidth(const wchar_t *pwcs, size_t n); DESCRIPTION
The wcswidth() function determines the number of column positions required for n wide-character codes (or fewer than n wide-character codes if a null wide-character code is encountered before n wide-character codes are exhausted) in the string pointed to by pwcs. RETURN VALUES
The wcswidth() function either returns 0 (if pwcs points to a null wide-character code), or returns the number of column positions to be occupied by the wide-character string pointed to by pwcs, or returns -1 (if any of the first n wide-character codes in the wide-character string pointed to by pwcs is not a printing wide-character code). ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ SEE ALSO
setlocale(3C), wcwidth(3C), attributes(5), standards(5) SunOS 5.10 14 Aug 2002 wcswidth(3C)

Check Out this Related Man Page

WCSWIDTH(3)						   BSD Library Functions Manual 					       WCSWIDTH(3)

NAME
wcswidth, wcswidth_l -- number of column positions in wide-character string LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <wchar.h> int wcswidth(const wchar_t *pwcs, size_t n); #include <wchar.h> #include <xlocale.h> int wcswidth_l(const wchar_t *pwcs, size_t n, locale_t loc); DESCRIPTION
The wcswidth() function determines the number of column positions required for the first n characters of pwcs, or until a null wide character (L'') is encountered. Although the wcswidth() function uses the current locale, the wcswidth_l() function may be passed a locale directly. See xlocale(3) for more information. RETURN VALUES
The wcswidth() function returns 0 if pwcs is an empty string (L""), -1 if a non-printing wide character is encountered; otherwise, it returns the number of column positions occupied. SEE ALSO
iswprint(3), wcwidth(3), xlocale(3) STANDARDS
The wcswidth() function conforms to IEEE Std 1003.1-2001 (``POSIX.1''). BSD
August 20, 2002 BSD
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Know any good codes?

Know any good codes? (2 Replies)
Discussion started by: fgjiu
2 Replies

2. Shell Programming and Scripting

Column wide file binding

What is the best way to bind files in column wide? Looks a simple, but I don't know the most economic way. I tried to merge, and cat function, but not success!! Ex.) file 1 1 2 3 2 3 4 file 2 3 4 5 4 5 6 file 3 2 3 4 1 2 7 I would like to see the result below file 4 1 2 3 3... (2 Replies)
Discussion started by: Jae
2 Replies

3. Shell Programming and Scripting

awk pad 1 column with leading zero if char > 12

Hello, I got a question. I have several csv files with lots of data in it and for the first column i have EAN codes. The problem that i am facing is that some of these codes have the leading 0 removed so they are 12 or less chars while a EAN code is (always?) 13 chars. For this i used a... (9 Replies)
Discussion started by: SDohmen
9 Replies

4. Shell Programming and Scripting

Filter lines based on values at specific positions

hi. I have a Fixed Length text file as input where the character positions 4-5(two character positions starting from 4th position) indicates the LOB indicator. The file structure is something like below: 10126Apple DrinkOmaha 10231Milkshake New Jersey 103 Billabong Illinois ... (6 Replies)
Discussion started by: kumarjt
6 Replies