Пример #1
0
        private static string Adjuststring(string txt, int width)
        {
            if (txt == null)
            {
                return(Filler.GetFiller(width));
            }
            if (txt.Length == width)
            {
                return(txt);
            }
            if (txt.Length > width)
            {
                return(txt.Substring(0, width));
            }
            var diff = width - txt.Length;

            return(txt + Filler.GetFiller(diff));
        }
Пример #2
0
 internal static string RenderNullCell(int width)
 {
     return(Filler.GetFiller(width));
 }
Пример #3
0
        private string AlignRight(string txt, int width)
        {
            var diff = width - GetWidth(txt);

            return(Filler.GetFiller(diff) + txt);
        }
Пример #4
0
        private string AlignLeft(string txt, int width)
        {
            var diff = width - GetWidth(txt);

            return(txt + Filler.GetFiller(diff));
        }