add capitalized?

pull/2/head
Matthew Butterick 11 years ago
parent ac57602756
commit 2741f08625

@ -12,3 +12,7 @@
(coerce/string? coerce/string? . -> . coerce/boolean?) (coerce/string? coerce/string? . -> . coerce/boolean?)
(and (<= (string-length ender) (string-length str)) (and (<= (string-length ender) (string-length str))
(equal? (substring str (- (string-length str) (string-length ender)) (string-length str)) ender))) (equal? (substring str (- (string-length str) (string-length ender)) (string-length str)) ender)))
(define+provide/contract (capitalized? str)
(coerce/string? . -> . coerce/boolean?)
(char-upper-case? (car (string->list str))))

Loading…
Cancel
Save