Is there any way to convert a CharSequence to an array of chars? Why doesn't the interface have a method to get characters as an array?
I first convert the CharSequence to String and then get it as character array:
public char[] getAsCharArray(CharSequence input) {
return input.toString().toCharArray();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With