View Source Avatador.Helpers (avatador v0.1.0)
Helper functions for Avatador.
Link to this section Summary
Link to this section Functions
Generate the initials for a String.
Convert a hash to Integer.
Convert a hash to List.
Hash a string.
Capitalize a String based on provided cap_option
- 1 for all uppercase
- 2 for all lowercase
- 3 for leaving such as provided
Convert a value to Boolean.
"true", true, "1", 1 returns true
"false", false, "0", 0 returns false
Convert a value to Float.
Only converts Float, Integer, and Binary values.
All else returns 0.0.
Convert a value to Integer.
Only converts Float, Integer, and Binary values.
All else returns 0.
Convert a value to String.
Only converts Float, Integer, and Binary values.
nil returns nil, all else returns "" (empty string).