ByteType
简述
返回字符串的指定位置的字符的类型,类型为:0 单字节字符,1 多字节的引导字节, 2 多字节的结尾字节。
ByteType(const S: string; Index: Integer): TMbcsByteType;
名称 | 类型 | 说明 |
---|
S | string | 字符串, |
Index | Integer | 整数,指定字符的位置 |
返回 | TMbcsByteType |
整数,代表各类型字符的这个数 |
//单字节字符‘t’
return ByteType("2011 tinysoft",6);
//0
//多字节字符‘天’
return ByteType("2011 tinysoft天软",14);
//1
//多字节字符‘软’,且为最后一个字符
return ByteType("2011 tinysoft天软",15);
//2
//单字节字符‘1’,最后一个字符
return ByteType("2011 ",4);
//0