/*-------------------------------------------------------------------------------------------------- xleft(string, cols, pad) Returns chars from col 1 to tcols --------------------------------------------------------------------------------------------------*/ char xleft(char *x, int xcols, char *xpad){ char *xret = ""; int xlth; int xadd; xlth = strlen(x); // Same length if(xlth == xcols){ return(x); } // Pad it? if(xcols => xlth){ xadd = xcols - xlth; xret = strcompose(x,strgenstr(xpad, xadd)); return (xret); } //Must be less if (xcols < xlth){ xret = strgetsubstr(x, 1, xcols); } return(xret); }//xleft