We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How can I separate characters within a string to be objects of an array?
For example:
for (int i = 0; i < string.length; i++) { character[i] = ______________; }
Answers
Not sure what you're asking. Perhaps you want a representation of a String as an array of
char
values?If it is so, just call method toCharArray() over a String object.
http://docs.Oracle.com/javase/8/docs/api/java/lang/String.html#toCharArray--
https://forum.Processing.org/two/discussions/tagged?Tag=tochararray()
It seems like toCharArray() isn't in the syntax :/
because it's a method on the java String class, not a processing specific thing
http://www.tutorialspoint.com/java/java_string_tochararray.htm