wcwidth(3C) Standard C Library Functions wcwidth(3C)NAME
wcwidth - number of column positions of a wide-character code
SYNOPSIS
#include <wchar.h>
int wcwidth(wchar_t wc);
DESCRIPTION
The wcwidth() function determines the number of column positions required for the wide character wc. The value of wc must be a character
representable as a wchar_t, and must be a wide-character code corresponding to a valid character in the current locale.
RETURN VALUES
The wcwidth() function either returns 0 (if wc is a null wide-character code), or returns the number of column positions to be occupied by
the wide-character code wc, or returns -1 (if wc does not correspond to 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), wcswidth(3C), attributes(5), standards(5)SunOS 5.11 14 Aug 2002 wcwidth(3C)
Check Out this Related 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)
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)
Hi,
I'm struggling to write a script to do the following,
-will go through each line in the file
-in a specific character positions, changes
the value to a new value
-These character positions are fixed througout the file
-----------------------
e.g.: file1.sh will have the following 3... (4 Replies)
I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX.
awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile
But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Hi,
I would like to know how can I get all the positions of a letter, let say letter C in a text file.
sample input file:
hcck
pgog
hlhhc
desired output file:
2
3
13
Many thanks! (2 Replies)
Hi.. i have two files one with positions information and another is sequence information. Now i need to read the positions and take the snps at the positions and replace that position base with the snp information in the sequence and write it in the snp information file.. for example
Snp file... (6 Replies)
Hi i have a file delimited with ","as below and i need to handle scenario like col1,col2 fields have special character '|', i need count of special character value column wise as given in col3 and col4. pls help me to reslove this.
Source file
name,col1,col2,col3,col4
one,2,3
two,2|3,2|3... (2 Replies)
Hi all, I have column 2 full of values like HIVE4A-56 and HIVE4-56. I want to convert all values like HIVE4A-56 to HIVE4-56.
So basically I want to delete all single alphabets before the '-' which is always preceded by a number. Values already in the desired format should remain unchanged... (4 Replies)
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)
I have a pipe delimited file and I'm trying to write a script that will give the character/byte positions of each pipe in the file. There may be some simple way but I don't know what it is... Can someone help with this?
Ex: file has output below
abc|def|ghi|
I want the script to tell the... (1 Reply)