hi guy,
i am trying to create a text wrapping method
soemthing like this
public void textwrap( String text, int width){
}
what i need it to do is to print the text in a column of specified width.
for example a user set width to 20, what the program needs to do is print words out in a column that is no bigger that 20 characters. words can not be cut they have to be full words so if the sum of two words ends up being more than 20 characters than just print out one word.
i been stuck on this for quite a while so any help will be apreciated
p.s the "text" variable is defined from a .txt file
thank you