java - Splitting Comma Delimited String into Multiple New Strings -


i have comma delimited string i'd split (i know how can accomplished - there plenty of resources on this) i'd take new split values , use them strings themselves.

for example

oldstring = "user,game,demo,points,level"  newstring0 = user  newstring1 = game  newstring2 = demo   newstring3 = points  newstring4 = level  

how can accomplished?

string[] newstrings = oldstring.split(",")

now use array:

newstring0 = newstrings[0];  newstring1 = newstrings[1];  newstring2 = newstrings[2];  newstring3 = newstrings[3];  newstring4 = newstrings[4]; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -