Using Ranch with Elixir Getting Started With Phoenix v1.3.0

Convert strings to any case

Ever wanted to convert snake case to camel case? You can use Macro module for that. Except it should not be used this way. As it states itself:

Do not use it as a general mechanism for underscoring or camelizing strings as it does not support Unicode or characters that are not valid in Elixir identifiers.

But with recase it is easy and reliable: Recase.to_camel("some_value") # => "someValue"

recase also supports: UpperCase, kebab-case, Path/case, CONSTANT_CASE, and

Check it out:

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.