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

InternalGetUnicodeCategory() static private method

static private InternalGetUnicodeCategory ( String value, int index ) : UnicodeCategory
value String
index int
return UnicodeCategory
        internal static UnicodeCategory InternalGetUnicodeCategory(String value, int index) {
            BCLDebug.Assert(value != null, "value can not be null");
            BCLDebug.Assert(index < value.Length, "index < value.Length");

            return (InternalGetUnicodeCategory(InternalConvertToUtf32(value, index)));
        }

Same methods

CharUnicodeInfo::InternalGetUnicodeCategory ( String str, int index, int &charLength ) : UnicodeCategory
CharUnicodeInfo::InternalGetUnicodeCategory ( int ch ) : UnicodeCategory

Usage Example

コード例 #1
0
        public static int[] ParseCombiningCharacters(string str)
        {
            if (str == null)
            {
                throw new ArgumentNullException("str");
            }
            int length = str.Length;

            int[] array = new int[length];
            if (length == 0)
            {
                return(array);
            }
            int             num = 0;
            int             i   = 0;
            int             num2;
            UnicodeCategory unicodeCategory = CharUnicodeInfo.InternalGetUnicodeCategory(str, 0, out num2);

            while (i < length)
            {
                array[num++] = i;
                i           += StringInfo.GetCurrentTextElementLen(str, i, length, ref unicodeCategory, ref num2);
            }
            if (num < length)
            {
                int[] array2 = new int[num];
                Array.Copy(array, array2, num);
                return(array2);
            }
            return(array);
        }
All Usage Examples Of System.Globalization.CharUnicodeInfo::InternalGetUnicodeCategory