Lucene.Net.Support.Character.CodePointCountImpl C# (CSharp) Метод

CodePointCountImpl() статический приватный Метод

static private CodePointCountImpl ( char a, int offset, int count ) : int
a char
offset int
count int
Результат int
        internal static int CodePointCountImpl(char[] a, int offset, int count)
        {
            int endIndex = offset + count;
            int n = 0;
            for (int i = offset; i < endIndex;)
            {
                n++;
                if (char.IsHighSurrogate(a[i++]))
                {
                    if (i < endIndex && char.IsLowSurrogate(a[i]))
                    {
                        i++;
                    }
                }
            }
            return n;
        }