diff options
-rw-r--r-- | transform/strings.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/transform/strings.scm b/transform/strings.scm index 568feef..7d9bc82 100644 --- a/transform/strings.scm +++ b/transform/strings.scm @@ -13,8 +13,17 @@ remove-duplicates sanitize-rdf-string snake->lower-camel + lower-case-and-replace-spaces string-capitalize-first)) +(define (lower-case-and-replace-spaces str) + (string-map + (lambda (c) + (if (char=? c #\space) + #\- ; replace space with hyphen + c)) ; convert character to lower case + (string-downcase str))) + (define (time-unix->string seconds . maybe-format) "Given an integer saying the number of seconds since the Unix epoch (1970-01-01 00:00:00), SECONDS, format it as a human readable |