string to arrat code example
Example 1: java string to char array
String str = "example";
char[] ch = str.toCharArray();
Example 2: javascript explode space
var str = "my car is red";
var stringArray = str.split(/(\s+)/);
console.log(stringArray); // ["my", " ", "car", " ", "is", " ", "red"]