0

Possible Duplicate:
Word wrap a a string in multiple lines

My first guess is that I'll have to do this myself, but I thought I'd ask to make sure there isn't any built in library. I have a string/paragraph that I want to output to a simple text file. However, I want so many spaces (23 to be exact) in the left margin, and I don't want a single line to go past 80 characters. Basically, the code would add the 23 characters to the beginning of each line, and then add new lines after each 80 characters. The hardest part would be to add the new lines since I wouldn't want to add the new line in the middle of a word. Am I on my own here?

1

1 Answer 1

0

look at left right padding example here

Not the answer you're looking for? Browse other questions tagged or ask your own question.