Dogma.Util.Name
Utility functions for analysing names.
Summary
probably_not_pascal_case?(name) | Returns true if the name is (probably) not |
probably_not_snake_case?(name) | Returns true if the name is (probably) not |
probably_pascal_case?(name) | Returns true if the name is (probably) |
probably_snake_case?(name) | Returns true if the name is (probably) |
Functions
Returns true if the name is (probably) not PascalCase
iex> Dogma.Util.Name.probably_not_pascal_case?( "FooBar" )
false
iex> Dogma.Util.Name.probably_not_pascal_case?( "fooBar" )
true
iex> Dogma.Util.Name.probably_not_pascal_case?( "foo_bar" )
true
Returns true if the name is (probably) not snake_case
iex> Dogma.Util.Name.probably_not_snake_case?( "foo_bar" )
false
iex> Dogma.Util.Name.probably_not_snake_case?( "fooBar" )
true
Returns true if the name is (probably) PascalCase
iex> Dogma.Util.Name.probably_pascal_case?( "FooBar" )
true
iex> Dogma.Util.Name.probably_pascal_case?( "fooBar" )
false
iex> Dogma.Util.Name.probably_pascal_case?( "foo_bar" )
false
Returns true if the name is (probably) snake_case
iex> Dogma.Util.Name.probably_snake_case?( "foo_bar" )
true
iex> Dogma.Util.Name.probably_snake_case?( "fooBar" )
false