if byte & 0x80 == 0 return 0; int count = 0; while byte & 0x80 != 0 count++; byte = 1; if count != 1 && count != 2 && count != 3 return 0; return
该代码段的作用是判断一个字节是否是UTF-8编码的多字节序列的起始字节。如果是,返回1;否则返回0。
原文地址: https://www.cveoy.top/t/topic/brB7 著作权归作者所有。请勿转载和采集!