summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-07 09:14:03 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-07 09:14:03 -0800
commit35b83a9039898856776d1237a151f29cbce28a2f (patch)
tree9058ca6976feb557312d6d0da76d2cc913bad95e /lib.c
parent46dea2737dcd5d74585878459999f230f2d002bc (diff)
downloadtxr-35b83a9039898856776d1237a151f29cbce28a2f.tar.gz
txr-35b83a9039898856776d1237a151f29cbce28a2f.tar.bz2
txr-35b83a9039898856776d1237a151f29cbce28a2f.zip
* eval.c (eval_init): New functions registered as intrinsics.
* lib.c (chr_toupper, chr_tolower): New functions. * lib.h (chr_toupper, chr_tolower): New functions declared.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 82ab73a1..21e068cc 100644
--- a/lib.c
+++ b/lib.c
@@ -1528,6 +1528,16 @@ val chr_isxdigit(val ch)
return c_true(iswxdigit(c_chr(ch)));
}
+val chr_toupper(val ch)
+{
+ return chr(towupper(c_chr(ch)));
+}
+
+val chr_tolower(val ch)
+{
+ return chr(towlower(c_chr(ch)));
+}
+
val chr_str(val str, val index)
{
bug_unless (length_str_gt(str, index));