diff options
author | Munyoki Kilyungi | 2023-07-18 16:09:45 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-07-30 12:29:56 +0300 |
commit | d27851ca714d2b0c2256d295df38e1b841547aed (patch) | |
tree | 3a91aa3b8342f54903ddd0f8fb37e099efb337fb | |
parent | 4c6ff9d1199ec9ba43a826dad3df2e766190d327 (diff) | |
download | gn-transform-databases-d27851ca714d2b0c2256d295df38e1b841547aed.tar.gz |
Add string-capitalize-first
* dump/strings.scm: Export string-capitalize-first
(string-capitalize-first): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r-- | dump/strings.scm | 8 |
1 files changed, 7 insertions, 1 deletions
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)) + |