CBA_fnc_prettyFormat

Description

Makes an array easy to read.

Parameters

_arrayArray to format ARRAY
_indentsIndentation string (optional, default: “ “) STRING
_lineBreakSeperator string (optional, default: endl) STRING
_depthInitial indentation count (optional, default: 0) <NUMBER>

Returns

Formatted string STRING

Examples

[[0, 1, ["22", 33, []], 4]] call CBA_fnc_prettyFormat;
//[
//    0,
//    1,
//    [
//        "22",
//        33,
//        []
//    ],
//    4
//]

[[0, 1, ["22", 33, []], 4], ">---"] call CBA_fnc_prettyFormat;
//[
//>---0,
//>---1,
//>---[
//>--->---"22",
//>--->---33,
//>--->---[]
//>---],
//>---4
//]

[[0, 1, ["22", 33, []], 4], ">---", "\n"] call CBA_fnc_prettyFormat;
//[\n>---0,\n>---1,\n>---[\n>--->---"22",\n>--->---33,\n>--->---[]\n>---],\n>---4\n]

Author

Terra, Dystopian, commy2

Array to read from [Array]
string used by format
Close