字节 汉字判断

  • XE7

TMbcsByteType : unsigned char { mbSingleByte, mbLeadByte, mbTrailByte };

TMbcsByteType __fastcall ByteType _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const System::AnsiString S, int Index)/* overload */;
TMbcsByteType __fastcall ByteType(const System::UnicodeString S, int Index)/* overload */;

 

System.UnicodeString.IsLeadSurrogate

bool IsLeadSurrogate(int index)

Tests whether the element is a lead surrogate.

IsLeadSurrogate returns true if the indexed element is a lead surrogate and false otherwise. Note that index is an element index into the string, not a character or byte index. 

 

System.UnicodeString.IsTrailSurrogate

bool         IsTrailSurrogate(int index)

Tests whether the element is a trail surrogate.

IsTrailSurrogate returns True if the indexed element is a trail surrogate and False, otherwise. Note that index is an element index into the string, not a character or byte index. 



  • c6

IsLeadByte

IsTrailByte

 

Returns true if the specified byte is a lead byte.

bool __fastcall IsLeadByte(int index) const;

Description

IsLeadByte returns true if the byte indicated by index (counting from 0) is the lead byte in a multi-byte character. If the byte is a trailing byte, or not part of a multi-byte character, IsLeadByte returns false.

 

Returns true if the specified byte is of type mbTrailByte.

bool __fastcall IsTrailByte(int index) const;

Description

IsTrailByte returns true if the byte indicated by index (counting from 0) is the trailing byte in a multi-byte character. If the byte is a lead byte, or not part of a multi-byte character, IsTrailByte returns false.

 

System.SysUtils.TMbcsByteType

TMbcsByteType = (mbSingleByte, mbLeadByte, mbTrailByte);

TMbcsByteType represents the use of a single byte in a string that uses a multi-byte character set (MBCS).

TMbcsByteType represents the possible return values of the ByteType and StrByteType functions. Possible values are as follows. 

mbSingleByte

The char is used to represent an entire character in the string. The value of Char cannot be included in the LeadBytes set.

mbLeadByte

The char is used to represent the first byte of a multi-byte character. The value of Char must be included in the LeadBytes set.

mbTrailByte

The char is used to represent one of the trailing bytes in a multi-byte character. There are no a priori restrictions on the value of char.

判断是否数字数值

IsDigit

判断是否

转载于:https://www.cnblogs.com/cb168/p/4535328.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值