CSharpOutline.TextRegion.GetIndentation C# (CSharp) Метод

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

Gets line indent in whitespaces
private static GetIndentation ( string s ) : int
s string String to analyze
Результат int
        private static int GetIndentation(string s)
        {
            int i = 0;
            while (i < s.Length && char.IsWhiteSpace(s[i]))
                i++;
            //for lines entirely consisting of whitespace return int.MaxValue
            //so it won't affect indentation calculation
            return i == s.Length ? int.MaxValue : i;
        }