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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -