Can anyone please create a c function which formats like below example by taking string anand padding lenth as input. The string should be center aligned and length of padding (dash) is constant (say 45) and string len won’t exceed pad length.
example #1
————–ABOUT————
example #1
———-MY PAYMENTS———-
The question was to “help create”, not “create”, so here’s some pseudocode for you 🙂
I’ll leave it to you to rewrite that in C, shouldn’t be hard – drop a comment if there are any problems.