AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

String.replace

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Jean Pierre Daviau
Guest





PostPosted: Wed Dec 13, 2006 8:11 am    Post subject: String.replace Reply with quote



Hi ,

It does not work has expected.


Properties sysprops = System.getProperties();
strbuf.append(sysprops);

String liste = strbuf.toString();
liste.replace(',' , '\n');
-------------
, user.region=CA, file.encoding=Cp1252, java.compiler=symcjit,
java.vendor=Sun Microsystems Inc., etc
-----------------

Thanks for your attention.

Jean Pierre Daviau
--
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp
Back to top
Andrew Thompson
Guest





PostPosted: Wed Dec 13, 2006 8:11 am    Post subject: Re: String.replace Reply with quote



Jean Pierre Daviau wrote:
Quote:
Hi ,

It does not work has expected.


Properties sysprops = System.getProperties();
strbuf.append(sysprops);

String liste = strbuf.toString();
liste.replace(',' , '\n');

Here, the code is 'throwing away the result'.

Try instead..

liste = liste.replace(',' , '\n');

HTH

Andrew T.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.