• Post Reply Bookmark Topic Watch Topic
  • New Topic

append a space if found dbl separator  RSS feed

 
Maya Choy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
file.txt
a~b~c~~e

StringTokenizer st = new StringTokenizer(line,"~");

if found "~~" how do i append a space on it?
eg a~b~c~ ~e

tks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duplicate of: http://www.coderanch.com/forums/
Closing.
[ July 10, 2006: Message edited by: Ben Souther ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!