make separate-path-strings even cleaner
svn: r3091
This commit is contained in:
parent
6207c0fa5e
commit
e73d32b07d
|
@ -420,12 +420,8 @@
|
||||||
|
|
||||||
;; separate-path-strings : string[starting with /] -> (listof path/param)
|
;; separate-path-strings : string[starting with /] -> (listof path/param)
|
||||||
(define (separate-path-strings str)
|
(define (separate-path-strings str)
|
||||||
(if (string=? str "")
|
(let ([strs (regexp-split #rx"/" str)])
|
||||||
'()
|
(map separate-params (if (string=? "" (car strs)) (cdr strs) strs))))
|
||||||
(let ([str (if (char=? #\/ (string-ref str 0))
|
|
||||||
(substring str 1 (string-length str))
|
|
||||||
str)])
|
|
||||||
(map separate-params (regexp-split #rx"/" str)))))
|
|
||||||
|
|
||||||
(define (separate-params s)
|
(define (separate-params s)
|
||||||
(let ([lst (map path-segment-decode (regexp-split #rx";" s))])
|
(let ([lst (map path-segment-decode (regexp-split #rx";" s))])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user