zoukankan      html  css  js  c++  java
  • 字节 汉字判断

    • 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

    判断是否

  • 相关阅读:
    数据库学习笔记5---MySQL字符串函数、日期时间函数
    关于hibernate的AnnotationConfiguration的问题
    浅谈Java web 中request的setAttribute()用法
    JAVA常见面试题之Forward和Redirect的区别
    JSP页面中<%!%>与<%%>与<%=%>
    Servlet的生命周期
    JavaEE学习路线图
    java web项目WEB-INF与META-INF的作用
    iOS-申请邓白氏编码的超详细流程介绍
    从高版本JDK换成低版本JDK报错
  • 原文地址:https://www.cnblogs.com/cb168/p/4535328.html
Copyright © 2011-2022 走看看