Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
 internal static string RenderNullCell(int width)
 {
     return(Filler.GetFiller(width));
 }
Ejemplo n.º 3
0
        private string AlignRight(string txt, int width)
        {
            var diff = width - GetWidth(txt);

            return(Filler.GetFiller(diff) + txt);
        }
Ejemplo n.º 4
0
        private string AlignLeft(string txt, int width)
        {
            var diff = width - GetWidth(txt);

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