System.Globalization.CharUnicodeInfo.IsCombiningCategory C# (CSharp) Method

IsCombiningCategory() static private method

static private IsCombiningCategory ( UnicodeCategory uc ) : bool
uc UnicodeCategory
return bool
        internal static bool IsCombiningCategory(UnicodeCategory uc) {
            BCLDebug.Assert(uc >= 0, "uc >= 0");
            return (
                uc == UnicodeCategory.NonSpacingMark ||
                uc == UnicodeCategory.SpacingCombiningMark ||
                uc == UnicodeCategory.EnclosingMark
            );
        }

Usage Example

Esempio n. 1
0
        // Token: 0x06003054 RID: 12372 RVA: 0x000B935C File Offset: 0x000B755C
        internal static int GetCurrentTextElementLen(string str, int index, int len, ref UnicodeCategory ucCurrent, ref int currentCharCount)
        {
            if (index + currentCharCount == len)
            {
                return(currentCharCount);
            }
            int             num;
            UnicodeCategory unicodeCategory = CharUnicodeInfo.InternalGetUnicodeCategory(str, index + currentCharCount, out num);

            if (CharUnicodeInfo.IsCombiningCategory(unicodeCategory) && !CharUnicodeInfo.IsCombiningCategory(ucCurrent) && ucCurrent != UnicodeCategory.Format && ucCurrent != UnicodeCategory.Control && ucCurrent != UnicodeCategory.OtherNotAssigned && ucCurrent != UnicodeCategory.Surrogate)
            {
                int num2 = index;
                for (index += currentCharCount + num; index < len; index += num)
                {
                    unicodeCategory = CharUnicodeInfo.InternalGetUnicodeCategory(str, index, out num);
                    if (!CharUnicodeInfo.IsCombiningCategory(unicodeCategory))
                    {
                        ucCurrent        = unicodeCategory;
                        currentCharCount = num;
                        break;
                    }
                }
                return(index - num2);
            }
            int result = currentCharCount;

            ucCurrent        = unicodeCategory;
            currentCharCount = num;
            return(result);
        }
All Usage Examples Of System.Globalization.CharUnicodeInfo::IsCombiningCategory