problem with string:tokens

info <>
Tue Jun 30 15:16:19 CEST 2009


Hi All,

I have two strings: S1="A,,C,D" and S2="A,B,,D"

I do string:tokens(S1) :  "A","C","D"  length =3
I do string:tokens(S2) :  "A","B","D"  length = 3

Imagine the string S = S1 or S2
How can I know if B is absent or C ?

It is a general question of course ! the tokens function cannot separate the tokens with a composite string unfortunately (here ",,")


More information about the erlang-questions mailing list