diff options
author | bptato <nincsnevem662@gmail.com> | 2023-05-16 13:17:41 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-05-16 13:18:47 +0200 |
commit | 4e0fd8c7ef2ad2f61c1ac0572e02b92b1c42b688 (patch) | |
tree | 83adafc3a2046bb8af09d7c57340dc9374eebbd6 /src/utils/twtstr.nim | |
parent | 951d587f7edf3544d30ba039530a1d19b7e9db78 (diff) | |
download | chawan-4e0fd8c7ef2ad2f61c1ac0572e02b92b1c42b688.tar.gz |
Refactor config, add charset opts
Only document-charset supported for now.
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 027b26d1..d67e1ab7 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -116,6 +116,12 @@ func toScreamingSnakeCase*(str: string): string = # input is camel case else: result &= c.toUpperAscii() +func snakeToKebabCase*(str: string): string = + result = str + for c in result.mitems: + if c == '_': + c = '-' + func isAscii*(r: Rune): bool = return cast[uint32](r) < 128 |