MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / writeArray

Method writeArray

src/univalue/lib/univalue_write.cpp:70–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, string& s) const
71{
72 s += "[";
73 if (prettyIndent)
74 s += "\n";
75
76 for (unsigned int i = 0; i < values.size(); i++) {
77 if (prettyIndent)
78 indentStr(prettyIndent, indentLevel, s);
79 s += values[i].write(prettyIndent, indentLevel + 1);
80 if (i != (values.size() - 1)) {
81 s += ",";
82 }
83 if (prettyIndent)
84 s += "\n";
85 }
86
87 if (prettyIndent)
88 indentStr(prettyIndent, indentLevel - 1, s);
89 s += "]";
90}
91
92void UniValue::writeObject(unsigned int prettyIndent, unsigned int indentLevel, string& s) const
93{

Callers

nothing calls this directly

Calls 3

indentStrFunction · 0.85
sizeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected