PhpAssocMap v1.0.0 PhpAssocMap.Exploder View Source

Link to this section Summary

Functions

Indents the whole associative array using either tabs or spaces. Defaults to 2 spaces

Link to this section Functions

Link to this function

explode(assoc) View Source
explode(binary()) :: binary()

Indents the whole associative array using either tabs or spaces. Defaults to 2 spaces.

Use explode/2 to specify identation.

Exemples

  iex> PhpAssocMap.Exploder.explode("['key'=>['next'=>'value']]")
  "[

'key'=>[

'next'=>'value'
]

]"

  iex> PhpAssocMap.Exploder.explode("['key'=>['next'=>'value']]", {:tabs})
  "[
'key'=>[
    'next'=>'value'
    ]
]"

  iex> PhpAssocMap.Exploder.explode("['key'=>['next'=>'value']]", {:spaces, 1})
  "[

'key'=>[ 'next'=>'value' ] ]"