MCPcopy Create free account
hub / github.com/Kitware/CMake / fixZerosInTheEnd

Function fixZerosInTheEnd

Utilities/cmjsoncpp/src/lib_json/json_tool.h:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 */
119template <typename Iter>
120Iter fixZerosInTheEnd(Iter begin, Iter end, unsigned int precision) {
121 for (; begin != end; --end) {
122 if (*(end - 1) != '0') {
123 return end;
124 }
125 // Don't delete the last zero before the decimal point.
126 if (begin != (end - 1) && begin != (end - 2) && *(end - 2) == '.') {
127 if (precision) {
128 return end;
129 }
130 return end - 2;
131 }
132 }
133 return end;
134}
135
136} // namespace Json
137

Callers 1

valueToStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…