zoukankan      html  css  js  c++  java
  • c++ 字符检测 TCharacter

    c++ 字符检测

    IsSurrogatePair,IsHighSurrogate,IsLowSurrogate,ConvertToUtf32
    http://docwiki.embarcadero.com/CodeExamples/XE8/en/TCharacterSurrogates_%28C%2B%2B%29
    http://docwiki.embarcadero.com/CodeExamples/Berlin/en/CharacterTypes_(C%2B%2B)
    /* Calculate all all kinds of charcters in the memo */
        for (int i = 1; i <= allText.Length(); ++i)
        {
            /* Check for digit */
            if (TCharacter::IsDigit(allText[i])) LDigits++;
     
            /* Check for number */
            if (TCharacter::IsNumber(allText[i])) LNumber++;
     
            /* Check for letter */
            if (TCharacter::IsLetter(allText[i])) LLetters++;
     
            /* Check for lower-cased letter */
            if (TCharacter::IsLower(allText[i])) LLower++;
     
            /* Check for upper-cased letter */
            if (TCharacter::IsUpper(allText[i])) LUpper++;
     
            /* Check for punctuation */
            if (TCharacter::IsPunctuation(allText[i])) LPuct++;
     
            /* Check for separators */
            if (TCharacter::IsSeparator(allText[i])) LSep++;
     
            /* Check for symbols */
            if (TCharacter::IsSymbol(allText[i])) LSymbols++;
     
            /* Check for symbols */
            if (TCharacter::IsWhiteSpace(allText[i])) LWhites++;
        }
  • 相关阅读:
    GPS定位的实现
    app启动监听网络类型
    tableview 刷新某一行跟某一组
    给app 添加手势验证
    类似支付宝启动页面的实现
    xcode 插件安装路径
    Windows上Dart安装
    Skynet通讯遇到的奇怪问题
    与流氓的斗争
    Skynet:Debug Console的扩展
  • 原文地址:https://www.cnblogs.com/cb168/p/4645434.html
Copyright © 2011-2022 走看看