Hi: I'm pretty sure this is an easy problem, but I admit I'm not real knowledgeable on string manipulation.
My existing code is below. What I want to do is make it so that it can accommodate up to 10 "+"'s easily and so I have them nicely spaced so I can then add a second column and third column the same way. Obviously, if there is an easier way to do it, I'm all for it. I do know I'll need to remove the \n\r from the end in order to accommodate the second and third column.
You should really learn the common format that sprintf takes (and printf as well), as they're not only useful but pretty cool. Using this formatting, you should be able to say something like "display N +s". Not only that, but if you wanted to get fancy, you could align the dots and pluses to the right (or center) with leading (and trailing spaces if centered).
I'm pretty sure this is an easy problem, but I admit I'm not real knowledgeable on string manipulation.
My existing code is below. What I want to do is make it so that it can accommodate up to 10 "+"'s easily and so I have them nicely spaced so I can then add a second column and third column the same way. Obviously, if there is an easier way to do it, I'm all for it. I do know I'll need to remove the \n\r from the end in order to accommodate the second and third column.