• Post Reply Bookmark Topic Watch Topic
  • New Topic

Strings  RSS feed

 
Kinga Cserveny
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help me with what would be the best way to get the user name out of the following String?
String s = "USER_ID=12345,USERNAME=SMITHS,USER_AGE=25";
 
sanj singh
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kinga
Tokenize the string.
regards
sanj
[This message has been edited by sanj singh (edited September 20, 2001).]
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Slightly dirty, but quick:This question has nothing whatsoever to do with either servlets or JSPs, by the way - please pick a more appropriate forum next time. Thanks.
- Peter

[This message has been edited by Peter den Haan (edited September 20, 2001).]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about this one?
[This message has been edited by Mike Curwen (edited September 20, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!