in reply to Drawing a table

You don't need to create a string-truncating function; printf() and sprintf() can truncate for you. The format "%20.20s" means "a 20 character right-justified string truncated at 20 characters".

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^2: Drawing a table
by hotshot (Prior) on Jun 29, 2005 at 12:40 UTC
    True, but my function truncates 3 additional chars and put '...' instead so the user will know there's more.