"explode" array in arduino!?

// My array look like this in string
var str 'one|two|three|four';

// is there a function like EXPLODE in Arduino?
Serial.println(explode('|'str, -1));

If not, any method to do something similar? Thanks in advance if anyone has any clue :)

str_tok() modifies its argument…

Please take into account that the strtok() modifies the original string (it puts the pointer at the start of the word and replaces the tokens with \0 NULL characters to terminate it).

Keep that in mind if you wonder why the contents of your “one|two|three|four” string changed :slight_smile: