JR

JR

  • NA
  • 16
  • 32.8k

Help with splitting string

Oct 1 2010 6:23 PM
Hello,

My name is JR and I am writing a small application that I use to communicate with my Arduino board (www.arduino.cc). Communication is done using serial commands.

I want to split a string based on another string. For example:

string SerialIn = "Button1[e]Button2[e]Button3[e]Button4[e]"
string Footer = "[e]"


So I get:
Button1
Button2
Button3
Button4
I've tried the split function but this allow me to split based on chars and not a specific sequence of chars (string).

Anyone who has some advice?

Thanks in advance,

JR


Answers (2)