What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Space words out in JAVA?

Space words out in JAVA?
Author: Message:
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: Space words out in JAVA?
I'm not really understanding what you want...
you have a string off words... between the words are spaces and you want to add spaces?
couldn't you just do something like:

code:
String s="the string";
int i=0;
while(i>-1&&i<s.length){
   i=s.IndexOf(" ",i);
   String temp1 = s.substring(0,i);
   String temp2 = s.substring(i,s.length);
   temp1 +=" ";
   s= temp1+temp2
}

or something like that?

This post was edited on 12-10-2006 at 04:06 PM by foaly.
12-10-2006 04:05 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Space words out in JAVA? - by albert on 12-10-2006 at 01:36 AM
RE: Space words out in JAVA? - by foaly on 12-10-2006 at 04:05 PM
RE: Space words out in JAVA? - by RaceProUK on 12-10-2006 at 07:24 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On