From b771607caf44f4de89cbb484aea5205c2d4af4f1 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 26 Jan 2017 15:37:57 -0800 Subject: [PATCH] Implement char=-predicate and char-ci=-predicate. --- src/runtime/char.scm | 10 ++++++++++ src/runtime/runtime.pkg | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/runtime/char.scm b/src/runtime/char.scm index 1ac8103ee..2e2aedc34 100644 --- a/src/runtime/char.scm +++ b/src/runtime/char.scm @@ -133,6 +133,16 @@ USA. (define-integrable (char-ci->integer char) (char->integer (char-upcase char))) + +(define (char=-predicate char) + (guarantee char? char 'char=-predicate) + (lambda (char*) + (char=? char* char))) + +(define (char-ci=-predicate char) + (guarantee char? char 'char-ci=-predicate) + (lambda (char*) + (char-ci=? char* char))) (define (char-downcase char) (%case-map-char char downcase-table)) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 3dc076c3d..9f46f3fa7 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1308,6 +1308,7 @@ USA. char-bits-set? char-ci<=? char-ci=? char-ci>? @@ -1321,6 +1322,7 @@ USA. char-utf8-byte-length char<=? char=? char>? -- 2.25.1