MCPcopy Create free account
hub / github.com/Samsung/UTopia / fixZerosInTheEnd

Function fixZerosInTheEnd

external/jsoncpp/jsoncpp.cpp:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 * were to delete zeros in the end of string, but not the last zero before '.'.
198 */
199template <typename Iter> Iter fixZerosInTheEnd(Iter begin, Iter end) {
200 for (; begin != end; --end) {
201 if (*(end - 1) != '0') {
202 return end;
203 }
204 // Don't delete the last zero before the decimal point.
205 if (begin != (end - 1) && *(end - 2) == '.') {
206 return end;
207 }
208 }
209 return end;
210}
211
212} // namespace Json
213

Callers 1

valueToStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected