check whether a string is upper or lower case

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By OPMRCL

does sombody know a way to chechk whether a string is upper or lower case in gdscript?

:bust_in_silhouette: Reply From: juppi

Try that:

var text = "hello"

if (text == text.to_lower()):
	print("text is lower case")
elif (text == text.to_upper()):
	print("text is upper case")
else:
	print("text is neither")