How to split the digits in a character array and store it in integer array

Suppose i have the input like this

{1,2,3,4,5,6,23,43}

The output should look like this

1 2 3 4 5 6 23 43 

How to do it ?