Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

STRING MANAGEMENT

 
Gabriel Collet
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.

I have a string which is made of several different strings separated by a "+" sign. Now I want to divide it into different substrings, each one containing the information between two "+" signs. I�ve tried using lasIndexOf command, by I keep getting the same error when building the application (canno resolve symbol). DOES ANYONE KNOW THE TRICK OR HAS A SAMPLE I CAN USE?!!!

PLEASE, GIVE ME A HAND.

Thanks a lot.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"JG GA"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need a "/" or is it a "\" before the plus sign to , now what is that word, to to escape it. The "/" is an escape character for characters that might have other meanings to the compiler, like the plus sign.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or use a different seperator. Use a comma instead in the String instead of putting "+" in the String.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic