I need to prefix a few lines of text with either 3 or 6 spaces by just using printf statement. The lines vary in lenght. One of the lines is 10 characters and needs 3 spaces before it, thus I used
printf ("%13s\n", "10chartext");
In this case I counted the lenght of the text. Is there another efficient way to achieve this to prefix the some longer text with 6 spaces sing just printf?
Thanks