• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Splitting Strings

 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anyone know how I can take a String and split it into 2 seperate strings? I have a name string and need it to be changed into a firstname string and second name string so the split should occur at the space.
Thanks
 
fred rosenberger
lowercase baba
Bartender
Posts: 12084
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could use a stringTokenizer. check out the API here:
StringTokenizer
[ February 09, 2004: Message edited by: fred rosenberger ]
 
Peyton McCullough
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The split() function will also work.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic