• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HOW TO BREAK (TOKENIZE) A STRING ( like stringTokenizer in java)

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
Say I have a string
moumita+saltlake+india+software
I have this string in java script..
I want the values separetely anywhere where the
+ sign is there
ie I want the values
moumita
saltlake
india
software
If I was using java I would have used stringTokenizer on the "+" sign..
But how to do this in Javascript.
Please help
Thanks
Mou
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use "split" method of String object in javascript, and you'll get he desired results in an array.
HTH,
- Manish
reply
    Bookmark Topic Watch Topic
  • New Topic