Jump to content

Caesar cipher: Difference between revisions

m
→‎{{header|OCaml}}: comparison operators work on chars
(Updated D code)
m (→‎{{header|OCaml}}: comparison operators work on chars)
Line 754:
 
<lang ocaml>let islower c =
let c1c >= int_of_char 'a' && c <= 'z'
and c2 = int_of_char 'z' in
int_of_char c >= c1 && int_of_char c <= c2
 
let isupper c =
let c1c >= int_of_char 'A' && c <= 'Z'
and c2 = int_of_char 'Z' in
int_of_char c >= c1 && int_of_char c <= c2
 
let rot x str =
Cookies help us deliver our services. By using our services, you agree to our use of cookies.