diff options
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 1916fff5..765ec24a 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -61,15 +61,6 @@ func toHeaderCase*(str: string): string = c = c.toUpperAscii() flip = c == '-' -func toScreamingSnakeCase*(str: string): string = # input is camel case - if str.len >= 1: result &= str[0].toUpperAscii() - for c in str.toOpenArray(1, str.high): - if c in AsciiUpperAlpha: - result &= '_' - result &= c - else: - result &= c.toUpperAscii() - func snakeToKebabCase*(str: string): string = result = str for c in result.mitems: @@ -93,9 +84,6 @@ func camelToKebabCase*(s: string): string = else: result &= c -func isAscii*(r: Rune): bool = - return uint32(r) < 128 - func startsWithNoCase*(str, prefix: string): bool = if str.len < prefix.len: return false # prefix.len is always lower @@ -129,7 +117,7 @@ func decValue*(c: char): int = func isAscii*(s: string): bool = for c in s: - if c > char(0x80): + if c >= char(0x80): return false return true |