Esempio n. 1
0
        private int IndexOfCharOrdinalIgnoreCase(char value)
        {
            if (!char.IsAscii(value))
            {
                return(CompareInfo.Invariant.IndexOf(this, value, CompareOptions.OrdinalIgnoreCase));
            }

            if (char.IsAsciiLetter(value))
            {
                char valueUc = (char)(value | 0x20);
                char valueLc = (char)(value & ~0x20);
                return(SpanHelpers.IndexOfAnyChar(ref _firstChar, valueLc, valueUc, Length));
            }

            return(SpanHelpers.IndexOfChar(ref _firstChar, value, Length));
        }