System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace C# (CSharp) Метод

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

private static ArrayElementsHaveSpace ( string array ) : bool
array string
Результат bool
        private static bool ArrayElementsHaveSpace(string [] array)
        {

            for (int i=0; i<array.Length; i++)
            {
                // it is faster to check for space character manually instead of calling IndexOf
                // so we don't have to go to native code side.
                for (int j=0; j<array[i].Length; j++)
                {
                    if ( Char.IsWhiteSpace(array[i][j]) )
                    {
                        return true;
                    }
                }
            }

            return false;
        }                        

Usage Example

Пример #1
0
        // Token: 0x06002E17 RID: 11799 RVA: 0x000B0C68 File Offset: 0x000AEE68
        internal static FORMATFLAGS GetFormatFlagUseSpaceInMonthNames(string[] monthNames, string[] genitveMonthNames, string[] abbrevMonthNames, string[] genetiveAbbrevMonthNames)
        {
            FORMATFLAGS formatflags = FORMATFLAGS.None;

            formatflags |= ((DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(monthNames) || DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(genitveMonthNames) || DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(abbrevMonthNames) || DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(genetiveAbbrevMonthNames)) ? FORMATFLAGS.UseDigitPrefixInTokens : FORMATFLAGS.None);
            return(formatflags | ((DateTimeFormatInfoScanner.ArrayElementsHaveSpace(monthNames) || DateTimeFormatInfoScanner.ArrayElementsHaveSpace(genitveMonthNames) || DateTimeFormatInfoScanner.ArrayElementsHaveSpace(abbrevMonthNames) || DateTimeFormatInfoScanner.ArrayElementsHaveSpace(genetiveAbbrevMonthNames)) ? FORMATFLAGS.UseSpacesInMonthNames : FORMATFLAGS.None));
        }
All Usage Examples Of System.Globalization.DateTimeFormatInfoScanner::ArrayElementsHaveSpace