android - Tasker variable editing add commas -


i need edit string value in variable.

so,

00343755932 

should converted to:

0,0,3,4,3,7,5,5,9,3,2 

because must define each number variable array readable 1 one.

if i'm right trying create array string. use following code

string val = "00343755932";         int[] numberarray = new int[val.length()];         matcher match = pattern.compile("[0-9]").matcher(val);         int = 0;         while(match.find()) {             system.out.println(match.group());             numberarray[i] = integer.parseint(match.group());             i++;         } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -