MCPcopy Create free account
hub / github.com/baidu/tera / ParseFloatNumber

Function ParseFloatNumber

src/common/base/string_number.cc:149–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147
148template <typename T>
149bool ParseFloatNumber(const char* str, T* value, char** endptr) {
150 int old_errno = errno;
151 errno = 0;
152 *value = StringToFloat<T>::Convert(str, endptr);
153 if (errno != 0) return false;
154 if (*endptr == str) errno = EINVAL;
155 errno = old_errno;
156 return true;
157}
158}
159
160bool ParseNumber(const char* str, float* value, char** endptr) {

Callers 1

ParseNumberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected