View Source PhpAssocMap.Utils (PhpAssocMap v2.0.1)
Summary
Functions
Converts a key and a value into an associative array association using arrow
Convert a string for a literal string by escaping quotes and wrapping into them
Wraps a value inside specified string.
Functions
Converts a key and a value into an associative array association using arrow
## Exemples
iex> PhpAssocMap.Utils.associate("my_key", "'Some value'")
"'my_key'=>'Some value'"
Convert a string for a literal string by escaping quotes and wrapping into them
## Exemples
iex> PhpAssocMap.Utils.stringify("Jon's")
"'Jon\\'s'"
Wraps a value inside specified string.
Using wrap/2 will wrap both end using the same string. Using the wrap/3 will wrap left with second parameter and right with third
## Exemples
iex> PhpAssocMap.Utils.wrap("house", "*")
"*house*"
iex> PhpAssocMap.Utils.wrap("house", "{", "}")
"{house}"