Macro.camelize

You're seeing just the function camelize, go back to Macro module for more information.

Specs

camelize(String.t()) :: String.t()

Converts the given string to CamelCase format.

This function was designed to camelize language identifiers/tokens, that's why it belongs to the Macro module. Do not use it as a general mechanism for camelizing strings as it does not support Unicode or characters that are not valid in Elixir identifiers.

Examples

iex> Macro.camelize("foo_bar")
"FooBar"

If uppercase characters are present, they are not modified in any way as a mechanism to preserve acronyms:

iex> Macro.camelize("API.V1")
"API.V1"
iex> Macro.camelize("API_SPEC")
"API_SPEC"