Prex v0.0.2 Prex.NameHelpers View Source

Naming helpers for Prex

Link to this section Summary

Functions

Normalizes function names for use in elixir

Converts an http method name to equivalant atom for HTTPoison to use

Normalizes a module name to use in elixir

Normalizes a variable name for use in elixir

Remove special chars form string

Link to this section Functions

Link to this function normalize_func_name(fun_name) View Source
normalize_func_name(String.t) :: String.t

Normalizes function names for use in elixir

Examples

iex> Prex.NameHelpers.normalize_func_name "(Get user info )"
"get_user_info"
Link to this function normalize_http_method(method) View Source
normalize_http_method(String.t) :: String.t

Converts an http method name to equivalant atom for HTTPoison to use

Examples

iex> Prex.NameHelpers.normalize_http_method "GET"
":get"

iex> Prex.NameHelpers.normalize_http_method "POST "
":post"
Link to this function normalize_module_name(mod_name) View Source
normalize_module_name(String.t) :: String.t

Normalizes a module name to use in elixir

Examples

iex> Prex.NameHelpers.normalize_module_name " hello world"
"Helloworld"
Link to this function normalize_var_name(var_name) View Source
normalize_var_name(String.t) :: String.t

Normalizes a variable name for use in elixir

Examples

iex> Prex.NameHelpers.normalize_var_name "A bad var name "
"a_bad_var_name"
Link to this function remove_schar(string) View Source
remove_schar(String.t) :: String.t

Remove special chars form string

Examples

iex> Prex.NameHelpers.remove_schar "s()72mca&q "
"s72mcaq "