From d27851ca714d2b0c2256d295df38e1b841547aed Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 18 Jul 2023 16:09:45 +0300 Subject: Add string-capitalize-first * dump/strings.scm: Export string-capitalize-first (string-capitalize-first): New function. Signed-off-by: Munyoki Kilyungi --- dump/strings.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'dump/strings.scm') diff --git a/dump/strings.scm b/dump/strings.scm index 849b3c3..282b4e1 100644 --- a/dump/strings.scm +++ b/dump/strings.scm @@ -10,7 +10,8 @@ delete-substrings replace-substrings sanitize-rdf-string - snake->lower-camel)) + snake->lower-camel + string-capitalize-first)) (define (time-unix->string seconds . maybe-format) "Given an integer saying the number of seconds since the Unix @@ -92,3 +93,8 @@ association list mapping substrings to their replacements." char)))) (drop char-list 1) char-list))))) + +(define (string-capitalize-first string) + (string-titlecase + (string-downcase string) 0 1)) + -- cgit v1.2.3