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

Function from_sv

libs/base/string_utils.hpp:591–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589{
590template <typename T>
591bool from_sv(std::string_view sv, T & t, int base = 10)
592{
593 auto const end = sv.data() + sv.size();
594 auto const res = std::from_chars(sv.data(), end, t, base);
595 return (res.ec != std::errc::invalid_argument && res.ec != std::errc::result_out_of_range && res.ptr == end);
596}
597} // namespace impl
598
599template <class T>

Callers 1

to_uintFunction · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected