MCPcopy Create free account
hub / github.com/PlayFab/gsdk / fixZerosInTheEnd

Function fixZerosInTheEnd

cpp/cppsdk/jsoncpp.cpp:205–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

valueToStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected