MCPcopy Create free account
hub / github.com/crownengine/crown / toStringSigned

Function toStringSigned

3rdparty/bx/src/dtoa.cpp:472–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470
471 template<typename Ty>
472 int32_t toStringSigned(char* _dst, int32_t _max, Ty _value, uint32_t _base, char _separator)
473 {
474 if (_base == 10
475 && _value < 0)
476 {
477 if (_max < 1)
478 {
479 return 0;
480 }
481
482 _max = toString(_dst + 1, _max - 1, asUnsigned(-_value), _base, _separator);
483
484 if (_max == 0)
485 {
486 return 0;
487 }
488
489 *_dst = '-';
490 return int32_t(_max + 1);
491 }
492
493 return toString(_dst, _max, asUnsigned(_value), _base, _separator);
494 }
495
496 int32_t toString(char* _dst, int32_t _max, int32_t _value, uint32_t _base, char _separator)
497 {

Callers 1

toStringFunction · 0.85

Calls 1

toStringFunction · 0.70

Tested by

no test coverage detected