How to format strings using printf() to get equal length in the output?

后端 未结 6 1641
一个人的身影
一个人的身影 2020-11-28 05:10

I have two functions, one which produces messages like Starting initialization... and another which checks return codes and outputs \"Ok\", \

6条回答
  •  春和景丽
    2020-11-28 05:50

    There's also the rather low-tech solution of counting adding spaces by hand to make your messages line up. Nothing prevents you from including a few trailing spaces in your message strings.

提交回复
热议问题