android split string doesn't work correctly -


this question has answer here:

in android app, split array value array.

i have array name arraya. log of arraya[0]:

peter|mustermann

now split peter , mustermann, try this:

string [] arrayb = arraya[0].split("|"); 

but log of arrayb[0] , arrayb[1] not be:

peter

and

mustermann

it be:

p

and

nothing

any ideas ? :(

just use single quote

string [] arrayb = arraya[0].split('|'); 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -