Is there a way to check if a char is uppercase / lowercase other than:
(char+"").toLowerCase().charAt(0) == char ?
I saw this method
but it didn’t seem to work.
I tried using:
println(a.isUpperCase(), isUpperCase(a), a.isUpperCase(int(a)), "etc");
but none worked.
What I need:
- a way to check if the input char is upper case (true / false)
- a way to set the CASE of a char (simple using strings, but is it wasteful?)
( setCase(char c) )
- a way to invert the case of a char ( invertCase(char c) )
- compare if
char1 == CHAR1(can use multiple functions)