How to convert string to camel and snake case in Elixir

Converting into snake case
> Macro.underscore("ThisWillBeSnakeCase")
"this_will_be_snake_case"
Converting into camel case
> Macro.camelize("this_will_be_camel_case")
"ThisWillBeCamelCase"
Work with a team that keeps learning and building better software every day.
Related posts
Dive deeper into this topic with these related posts
No items found.
You might also like
Discover more content from this category
By default in the test env, Phoenix doesn't show Logger.debug/Logger.info outputs in the console.
Hey! Have you ever wondered about tests running inside the IEx shell? For a long time, I was convinced that it’s not really possible. And as it turns out - that’s not really straightforward. You won’t easily find information about that in the documentation.
Nowadays, with an ever-growing number of web services, we tend to overload Web apps with external resources. As a result, it decreases page load speed and affects SEO score. There is a pretty easy solution for that.
