right filling string till length = 5
Posted on 2000-03-28
Here is my code for starters:
/*5 spaces */
if(strlen(wc) != 5);
/* fill to the right with spaces till length = 5 */
else strcat(com_buffer, wc);
Where the comment is to fill to the right is where I need to insert the code that will take the length of wc if less than 5 anf fill it to the right with spaces. So if user inputs "a" wc becomes "a " and so on.