mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 08:47:35 +02:00
Issue #369 - Switch over to multi-arg string cmp
This commit is contained in:
parent
5bb83cbfc6
commit
346a6e4bd5
1 changed files with 5 additions and 7 deletions
|
@ -605,14 +605,12 @@
|
|||
(define (char>=? c1 c2 . cs) (Cyc-bin-op-char >= c1 (cons c2 cs)))
|
||||
; TODO: char-ci predicates (in scheme/char library)
|
||||
|
||||
(define (string=? str1 str2 . strs) (Cyc-bin-op fast-string=? str1 (cons str2 strs)))
|
||||
(define (string<? str1 str2 . strs) (Cyc-bin-op fast-string<? str1 (cons str2 strs)))
|
||||
(define (string<=? str1 str2 . strs) (Cyc-bin-op fast-string<=? str1 (cons str2 strs)))
|
||||
(define (string>? str1 str2 . strs) (Cyc-bin-op fast-string>? str1 (cons str2 strs)))
|
||||
(define (string>=? str1 str2 . strs) (Cyc-bin-op fast-string>=? str1 (cons str2 strs)))
|
||||
|
||||
; ; TODO: generalize to multiple arguments: (define (string<? str1 str2 . strs)
|
||||
;(define (string=? str1 str2 . strs) (Cyc-bin-op fast-string=? str1 (cons str2 strs)))
|
||||
(define (string=? str1 str2) (equal? (string-cmp str1 str2) 0))
|
||||
(define (string<? str1 str2) (< (string-cmp str1 str2) 0))
|
||||
(define (string<=? str1 str2) (<= (string-cmp str1 str2) 0))
|
||||
(define (string>? str1 str2) (> (string-cmp str1 str2) 0))
|
||||
(define (string>=? str1 str2) (>= (string-cmp str1 str2) 0))
|
||||
(define (fast-string=? str1 str2) (equal? (string-cmp str1 str2) 0))
|
||||
(define (fast-string<? str1 str2) (< (string-cmp str1 str2) 0))
|
||||
(define (fast-string<=? str1 str2) (<= (string-cmp str1 str2) 0))
|
||||
|
|
Loading…
Add table
Reference in a new issue