my-solutions/codewars/ocaml/is-the-string-uppercase/main.ml

2 lines
95 B
OCaml

let is_uppercase (s: string): bool =
String.for_all (fun c -> not(c >= 'a' && c <= 'z')) s;;