MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / concatWhitespace

Function concatWhitespace

source/core/StarFormattedJson.cpp:155–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155String concatWhitespace(FormattedJson::ElementList const& elements, FormattedJson::ElementLocation from,
156 FormattedJson::ElementLocation to) {
157 String whitespace;
158 for (JsonElement const& elem : elements.slice(from, to)) {
159 if (elem.is<WhitespaceElement>())
160 whitespace += elem.get<WhitespaceElement>().whitespace;
161 }
162 return whitespace;
163}
164
165WhitespaceStyle detectWhitespace(FormattedJson::ElementList const& elements,
166 FormattedJson::ElementLocation insertLoc, bool array) {

Callers 1

detectWhitespaceFunction · 0.85

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected