Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I convert a String to a char array?

Is there any function to do this kind of job or do one have to parse each char and add it to the array?

like image 316
user726655 Avatar asked Nov 30 '22 08:11

user726655


1 Answers

Use String#toCharArray().

char[] chars = "some string".toCharArray();
like image 178
BalusC Avatar answered Dec 02 '22 20:12

BalusC