static int Shapecount(char s)
{
int l, r, m;
if ((s >= '\u0621') && (s <= '\u06D3') && !IsVowel(s)) {
l = 0;
r = chartable.Length - 1;
while (l <= r) {
m = (l + r) / 2;
if (s == chartable[m][0]) {
return chartable[m].Length - 1;
}
else if (s < chartable[m][0]) {
r = m - 1;
}
else {
l = m + 1;
}
}
}
else if (s == ZWJ) {
return 4;
}
return 1;
}