nativeIndexOfCharOrdinalIgnoreCase() приватный Метод

private nativeIndexOfCharOrdinalIgnoreCase ( void pNativeTextInfo, String str, Char value, int startIndex, int count ) : int
pNativeTextInfo void
str String
value Char
startIndex int
count int
Результат int
Пример #1
0
 public virtual unsafe int IndexOf(string source, char value, int startIndex, int count, CompareOptions options)
 {
     if (source == null)
     {
         throw new ArgumentNullException("source");
     }
     if ((startIndex < 0) || (startIndex > source.Length))
     {
         throw new ArgumentOutOfRangeException("startIndex", Environment.GetResourceString("ArgumentOutOfRange_Index"));
     }
     if ((count < 0) || (startIndex > (source.Length - count)))
     {
         throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_Count"));
     }
     if (options == CompareOptions.OrdinalIgnoreCase)
     {
         return(TextInfo.nativeIndexOfCharOrdinalIgnoreCase(TextInfo.InvariantNativeTextInfo, source, value, startIndex, count));
     }
     if (((options & ~(CompareOptions.IgnoreWidth | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase)) != CompareOptions.None) && (options != CompareOptions.Ordinal))
     {
         throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFlag"), "options");
     }
     if (!this.IsSynthetic)
     {
         return(IndexOfChar(this.m_pSortingTable, this.m_sortingLCID, source, value, startIndex, count, (int)options));
     }
     if (options == CompareOptions.Ordinal)
     {
         return(IndexOfChar(CultureInfo.InvariantCulture.CompareInfo.m_pSortingTable, this.m_sortingLCID, source, value, startIndex, count, (int)options));
     }
     return(this.SyntheticIndexOf(source, new string(value, 1), startIndex, count, GetNativeCompareFlags(options)));
 }