MCPcopy Create free account
hub / github.com/alibaba/graph-learn / FastStringToFloat

Function FastStringToFloat

graphlearn/src/common/string/numeric.cc:199–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199bool FastStringToFloat(const char* str, float* value) {
200 char* end = nullptr;
201 float ret = strtof(str, &end);
202 while (isspace(*end)) ++end;
203 if (*end == '\0') {
204 *value = ret;
205 return true;
206 }
207 return false;
208}
209
210bool FastStringToDouble(const char* str, double* value) {
211 char* end = nullptr;

Callers 3

ParseAttributeFunction · 0.85
ParseRecordMethod · 0.85
ParseRecordMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected