Main index | Section 3 | Options |
#include <wchar.h>
wint_t ch; int column, w;column = 0; while ((ch = getwchar()) != WEOF) { w = wcwidth(ch); if (w > 0 && column + w >= 20) { putwchar(L'\n'); column = 0; } putwchar(ch); if (ch == L'\n') column = 0; else if (w > 0) column += w; }
WCWIDTH (3) | August 17, 2004 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.