i have a doubt regarding word wrap in java. Here is the code i have written....
************************************************** ****************************************
public String Enter_LF_into_content(String inbound, Container container) {
String outbout = "";
int counter = inbound.length()/128;
for (int a=0;a<counter;a++)
{
outbound=outbound.concat(inbound.substring(a*128,( a+1)*128)).concat("\n");
}
outbound=outbound.concat(inbound.substring(counter *128));
return outbound;
}
************************************************** ************************
the above code wraps up string from 128th character but the problem is, it doesnt take care of the words it simply cuts the string from 128th position.
I need some custom code which can wrap the string by taking care of the words.
Plz guyzzzz.... i need help... its very urgent....