MCPcopy Create free account
hub / github.com/Universal-Team/Universal-Updater / formatNumber

Method formatNumber

source/utils/stringutils.cpp:90–97  ·  view source on GitHub ↗

Format a number with separators per locale */

Source from the content-addressed store, hash-verified

88 Format a number with separators per locale
89*/
90std::string StringUtils::formatNumber(u64 number) {
91 std::string out = std::to_string(number);
92 for (int i = out.size() - 3; i > 0; i -= 3) {
93 out.insert(i, Lang::get("THOUSAND_SEPARATOR"));
94 }
95
96 return out;
97}
98
99/*
100 Return a vector of all marks.

Callers

nothing calls this directly

Calls 3

getFunction · 0.85
sizeMethod · 0.80
insertMethod · 0.80

Tested by

no test coverage detected