diff options
author | 2010-01-12 16:09:13 -0500 | |
---|---|---|
committer | 2010-01-12 16:09:13 -0500 | |
commit | 227c87323603dc0b338e89997d2fce7ffc755fb0 (patch) | |
tree | e4130a31cf93875c66cb452ebcf893a4d2254f25 /lib | |
parent | 8eab6ba5a16002cd6e5ddfb6a09cb23b351c9d32 (diff) |
Allow escaped backslashes in literals; conversion betwixt int and char
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ur/basis.urs | 3 | ||||
-rw-r--r-- | lib/ur/char.ur | 3 | ||||
-rw-r--r-- | lib/ur/char.urs | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index d61763af..ea50b0b3 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -68,7 +68,8 @@ val isupper : char -> bool val isxdigit : char -> bool val tolower : char -> char val toupper : char -> char - +val ord : char -> int +val chr : int -> char (** String operations *) diff --git a/lib/ur/char.ur b/lib/ur/char.ur index 29e181e6..d2890bea 100644 --- a/lib/ur/char.ur +++ b/lib/ur/char.ur @@ -14,3 +14,6 @@ val isUpper = Basis.isupper val isXdigit = Basis.isxdigit val toLower = Basis.tolower val toUpper = Basis.toupper + +val toInt = Basis.ord +val fromInt = Basis.chr diff --git a/lib/ur/char.urs b/lib/ur/char.urs index 02e55632..c185af92 100644 --- a/lib/ur/char.urs +++ b/lib/ur/char.urs @@ -14,3 +14,6 @@ val isUpper : t -> bool val isXdigit : t -> bool val toLower : t -> t val toUpper : t -> t + +val toInt : t -> int +val fromInt : int -> t |