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

Method toFormattedInt

source/core/StarFormattedJson.cpp:399–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399String FormattedJson::toFormattedInt() const {
400 if (!isType(Json::Type::Int))
401 throw JsonException::format("Cannot call toFormattedInt on Json type {}, must be Int", typeName());
402 if (m_formatting.isValid())
403 return *m_formatting;
404 return toJson().repr();
405}
406
407String FormattedJson::repr() const {
408 if (m_formatting.isValid())

Callers 1

toJsonStreamMethod · 0.80

Calls 3

isValidMethod · 0.80
formatFunction · 0.70
reprMethod · 0.45

Tested by

no test coverage detected