MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / as_integer

Function as_integer

system/lib/libcxx/src/string.cpp:128–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126// string
127template <>
128inline int as_integer(const string& func, const string& s, size_t* idx, int base) {
129 // Use long as no Standard string to integer exists.
130 long r = as_integer_helper<long>(func, s, idx, base, strtol);
131 if (r < numeric_limits<int>::min() || numeric_limits<int>::max() < r)
132 throw_from_string_out_of_range(func);
133 return static_cast<int>(r);
134}
135
136template <>
137inline long as_integer(const string& func, const string& s, size_t* idx, int base) {

Callers

nothing calls this directly

Calls 3

minFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected