View Single Post
  #3 (permalink)  
Old April 19th, 2005, 04:58 PM
angrycat angrycat is offline
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello again, to do what I suggest you will to get the length of the string with something like:

int myInt = myString.length();

You could then use getChars to segment the string:

void getChars(int sourceStart, int sourceEnd, char target[], int targetStart)

You would need to devise a way to set the start and end values to segment the string into the appropriate lengths, then write the information back to a second string with the <br> inserted after each section.

Im sure there are examples that will help on the Sun Java site/forums.



Reply With Quote