mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 13:37:57 +03:00
core: add Char.upper-case and Char.lower-case
This commit is contained in:
parent
58a51af7fd
commit
0114ae806a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user