mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 13:16:36 +02:00
Updating regexp-match-num-matches to SRFI 115 regexp-match-count.
This commit is contained in:
parent
26716b1a2b
commit
c3b265f990
2 changed files with 3 additions and 3 deletions
|
@ -99,8 +99,8 @@
|
||||||
(%make-regexp-match (make-vector len #f) rx str))
|
(%make-regexp-match (make-vector len #f) rx str))
|
||||||
(define (make-regexp-match-for-rx rx str)
|
(define (make-regexp-match-for-rx rx str)
|
||||||
(make-regexp-match (rx-num-save-indexes rx) rx str))
|
(make-regexp-match (rx-num-save-indexes rx) rx str))
|
||||||
(define (regexp-match-num-matches md)
|
(define (regexp-match-count md)
|
||||||
(vector-length (regexp-match-matches md)))
|
(- (quotient (vector-length (regexp-match-matches md)) 2) 1))
|
||||||
|
|
||||||
(define (regexp-match-name-offset md name)
|
(define (regexp-match-name-offset md name)
|
||||||
(let lp ((ls (regexp-match-names md)) (first #f))
|
(let lp ((ls (regexp-match-names md)) (first #f))
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
regexp-matches regexp-matches? regexp-search
|
regexp-matches regexp-matches? regexp-search
|
||||||
regexp-replace regexp-replace-all
|
regexp-replace regexp-replace-all
|
||||||
regexp-fold regexp-extract regexp-split
|
regexp-fold regexp-extract regexp-split
|
||||||
regexp-match? regexp-match-num-matches
|
regexp-match? regexp-match-count
|
||||||
regexp-match-submatch regexp-match-submatch/list
|
regexp-match-submatch regexp-match-submatch/list
|
||||||
regexp-match->list regexp-match->sexp)
|
regexp-match->list regexp-match->sexp)
|
||||||
(import (srfi 33) (srfi 69))
|
(import (srfi 33) (srfi 69))
|
||||||
|
|
Loading…
Add table
Reference in a new issue