skellock / crappycase

A crappy nim package for various case conversions with strings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crappycase 💩

CircleCI

A crappy nim package for various case conversions with strings.

Installing

nimble install https://github.com/skellock/crappycase

Usage

import crappycase

kebab("foo bar")          # foo-bar
snake("foo bar")          # foo_bar
screamingSnake("foo bar") # FOO_BAR
pascal("foo bar")         # FooBar
camel("foo bar")          # fooBar
splitCase("foo bar")      # @["foo", "bar"]

For Idents Only

These conversions are mainly for idents. For example kebab("hey* ya") will be hey-ya. So this package is really only good for identifiers and such.

I'd be up for a PR to be less destructive if you need.

License

MIT. I guess.

Contributing

Fork it. Pull it. Patch it. Push it.

Send a PR, that should do it.

About

A crappy nim package for various case conversions with strings.

License:MIT License


Languages

Language:Nim 100.0%