码迷,mamicode.com
首页 > 编程语言 > 详细

c++ 字符检测 TCharacter

时间:2015-07-14 15:29:05      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

c++ 字符检测

IsSurrogatePair,IsHighSurrogate,IsLowSurrogate,ConvertToUtf32
http://docwiki.embarcadero.com/CodeExamples/XE8/en/TCharacterSurrogates_%28C%2B%2B%29
/* 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++;
    }

 

c++ 字符检测 TCharacter

标签:

原文地址:http://www.cnblogs.com/cb168/p/4645434.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!