BitServer.Program.size C# (CSharp) Method

size() private static method

private static size ( string s, int l ) : string
s string
l int
return string
        private static string size(string s, int l)
        {
            if (s.Length > l)
            {
                if (l > 3)
                {
                    s=s.Substring(0, l - 3) + "...";
                }
                else
                {
                    s=s.Substring(0, l);
                }
            }
            else if (s.Length<l)
            {
                while (s.Length < l)
                {
                    s += " ";
                }
            }
            return s;
        }