Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 558 Bytes

(8 kyu) Is the string uppercase.md

File metadata and controls

21 lines (15 loc) · 558 Bytes

Is the string uppercase (8 kyu)

https://www.codewars.com/kata/56cd44e1aa4ac7879200010b

Is the string uppercase?

Task

Create a method to see whether the string is ALL CAPS.

Examples (input -> output)

"c" -> False
"C" -> True
"hello I AM DONALD" -> False
"HELLO I AM DONALD" -> True
"ACSKLDFJSgSKLDFJSKLDFJ" -> False
"ACSKLDFJSGSKLDFJSKLDFJ" -> True
In this Kata, a string is said to be in ALL CAPS whenever it does not contain any lowercase letter so any string containing no letters at all is trivially considered to be in ALL CAPS.