fnv v0.2.0 Strinx

Some string transformation functions for Elixir

Heavily inspired by ActiveSupport's String extensions (Ruby).

Summary

Functions

foo_bar to FooBar

Like Strinx.camelcase/1, but you can specify if the first letter should be lowercase by setting first_letter_flag to :lower

foo_bar to foo-bar

FooBar to foo_bar

Functions

camelcase(input)

foo_bar to FooBar

camelcase(input, first_letter_flag)

Like Strinx.camelcase/1, but you can specify if the first letter should be lowercase by setting first_letter_flag to :lower.

Example

Strinx.camelcase("foo_bar", :lower)
#=> "fooBar"
dasherize(input)

foo_bar to foo-bar

underscore(input)

FooBar to foo_bar