From: Chris Hanson Date: Thu, 26 Jan 2017 23:37:57 +0000 (-0800) Subject: Implement char=-predicate and char-ci=-predicate. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~77 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b771607caf44f4de89cbb484aea5205c2d4af4f1;p=mit-scheme.git Implement char=-predicate and char-ci=-predicate. --- 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>?