MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / StringToFloatImpl

Function StringToFloatImpl

native/thirdpart/flatbuffers/util.h:321–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319
320template<typename T>
321inline bool StringToFloatImpl(T *val, const char *const str) {
322 // Type T must be either float or double.
323 FLATBUFFERS_ASSERT(str && val);
324 auto end = str;
325 strtoval_impl(val, str, const_cast<char **>(&end));
326 auto done = (end != str) && (*end == '\0');
327 if (!done) *val = 0; // erase partial result
328 return done;
329}
330
331// Convert a string to an instance of T.
332// Return value (matched with StringToInteger64Impl and strtod):

Callers 1

StringToNumberFunction · 0.85

Calls 1

strtoval_implFunction · 0.85

Tested by

no test coverage detected