MCPcopy Create free account
hub / github.com/comaps/comaps / to_uint64

Function to_uint64

libs/base/string_utils.hpp:516–519  ·  view source on GitHub ↗

Note: negative values will be converted too. For ex.: "-1" converts to std::numeric_limits ::max(); "-2" converts to std::numeric_limits ::max() - 1; "-3" converts to std::numeric_limits ::max() - 2; ... negative std::numeric_limits ::max() converts to 1. Values lower than negative std::numeric_limits ::max() are not convertible (method returns false).

Source from the content-addressed store, hash-verified

514// Values lower than negative std::numeric_limits<uint64_t>::max()
515// are not convertible (method returns false).
516[[nodiscard]] inline bool to_uint64(char const * s, uint64_t & i, int base = 10)
517{
518 return internal::ToInteger(s, i, base);
519}
520
521[[nodiscard]] inline bool to_int64(char const * s, int64_t & i)
522{

Callers 15

MappingFromCsvFunction · 0.85
AddAttrMethod · 0.85
ParseMaxspeedTagFunction · 0.85
CheckElementMethod · 0.85
LoadPopularPlacesFunction · 0.85
GetPopulationFunction · 0.85
ParseStreamMethod · 0.85
ParseStreamMethod · 0.85
ProcessMethod · 0.85
OsmTagMixerMethod · 0.85
json_object_foreachFunction · 0.85
ToIntMethod · 0.85

Calls 1

ToIntegerFunction · 0.85

Tested by 1

UNIT_TESTFunction · 0.68