aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-07-18 16:09:45 +0300
committerMunyoki Kilyungi2023-07-21 14:36:39 +0300
commitfb281f2c835907ee061b12cc58f4d2a96133dbc7 (patch)
tree3a91aa3b8342f54903ddd0f8fb37e099efb337fb
parent96757772a9a7b2b5e368d3d16ffbd09f3e95719a (diff)
downloadgn-transform-databases-fb281f2c835907ee061b12cc58f4d2a96133dbc7.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.scm8
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))
+