mbTrailByte 这里面的3个成员代表什么意思(15分)

  • 主题发起人 主题发起人 zsy_good
  • 开始时间 开始时间
Z

zsy_good

Unregistered / Unconfirmed
GUEST, unregistred user!
,讲详细一点好吗?
 
TMbcsByteType represents the use of a single-byte Char in a string that uses a multi byte character set (MBCS).

Unit

SysUtils

type TMbcsByteType = (mbSingleByte, mbLeadByte, mbTrailByte);

Description

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

Values Meaning

mbSingleByte The Char is used to represent an entire character in the string. The value of Char can not 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.
 
是否需要我帮你翻译一便?
 
是啊,我看不懂啊
 
有人会这个问题吗?我真的不理解什么意思
 
mbSingleByte 用于单字节字符,说明该 Char 是完整的字符

mbLeadByte 和 mbTrailByte 用于双字节字符,
前者说明该 Char 是一个字符的前半部分,后者说明该 Char 是一个字符的后半部分

对于英文,每一个字母都是一个 Char,都是 mbSingleByte
对于中文,每一个字由两个 Char 组成,前面那个叫 mbLeadByte,后面的叫 mbTrailByte
 
后退
顶部