int setNickLayer::countNum(const char * inText, int &outNum1, int &outNum2)
{
outNum1 = 0;
outNum2 = 0;
const char *p = inText;
while(*p)
{
unsigned char c = *p;
if(c < 0x80)
{
outNum2 ++;//中文
}
if(c >= 0xc0)
{
outNum1 ++;//英文
}
p ++;
}
return outNum1 * 2 + outNum2;
}