wcwidth method
Implementation
int wcwidth(int codePoint) {
if (codePoint < 32) return 0;
if (codePoint < 127) return 1;
if (codePoint < 65536) return table[codePoint];
if (bisearch(codePoint, HIGH_COMBINING)) return 0;
if (bisearch(codePoint, HIGH_WIDE)) return 2;
return 1;
}