Quick String Format Question (EASY)
Let's say you want to format the Strings:
JOHN BOB TIM TOMMY MILWAK JEFFERSON 15LETTERWORD And you wanted to format these strings to 15 spaces, so have them like up like john starthere bob starthere tim starthere tommy .... milwak .... jefferson .... 15letterword .... And after 15 spaces, you wanted the next word to start. Is there a format type command that you can use, such as printf ("%15d", int value) to get this accomplished. Because right now, I'm traversing each string and adding a space whenever it sees a terminating character '\0'. Is there no easier way? Thanks, Mistro116 |
Edit: Nevermind, Problem Solved.
Just read the man pages and the "%-15s" command will take care of this. Thanks anyways. Mistro116 |
All times are GMT -5. The time now is 03:51 PM. |