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"
Related posts
Dive deeper into this topic with these related posts
No items found.
You might also like
Discover more content from this category
In this post, you'll learn how to easily redirect users to the previous path using the Navigation History plug.
TLDR: With jest-extended
package you can write: expect([...set]).toIncludeSameMembers([value1, value2]);
. If you are looking to a native, but longer solution scroll down a bit.
There is a common scenario: You'd like to debug your Phoenix app with break!/4
or IEx.pry/0
. Everything works fine, until... Phoenix server throws a timeout error statement.