core: add Char.upper-case and Char.lower-case

This commit is contained in:
hellerve 2018-09-25 16:14:38 +02:00
parent 58a51af7fd
commit 0114ae806a

View File

@ -25,6 +25,14 @@
(defn /= [a b]
(not (= (the Char a) b)))
(doc lower-case "Tests whether a character is lower case.")
(defn lower-case [c]
(and (<= \a c) (<= c \z)))
(doc upper-case "Tests whether a character is upper case.")
(defn upper-case [c]
(and (<= \A c) (<= c \Z)))
)
(defmodule CharRef