System.Data.Common.DbConnectionOptions.GetKeyValue C# (CSharp) Метод

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

private static GetKeyValue ( StringBuilder buffer, bool trimWhitespace ) : string
buffer StringBuilder
trimWhitespace bool
Результат string
        private static string GetKeyValue(StringBuilder buffer, bool trimWhitespace)
        {
            int count = buffer.Length;
            int index = 0;
            if (trimWhitespace)
            {
                while ((index < count) && char.IsWhiteSpace(buffer[index]))
                {
                    index++; // leading whitespace
                }
                while ((0 < count) && char.IsWhiteSpace(buffer[count - 1]))
                {
                    count--; // trailing whitespace
                }
            }
            return buffer.ToString(index, count - index);
        }