MCPcopy Create free account
hub / github.com/DFHack/dfhack / l_str2dloc

Function l_str2dloc

depends/lua/src/lobject.c:251–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249#endif
250
251static const char *l_str2dloc (const char *s, lua_Number *result, int mode) {
252 char *endptr;
253 *result = (mode == 'x') ? lua_strx2number(s, &endptr) /* try to convert */
254 : lua_str2number(s, &endptr);
255 if (endptr == s) return NULL; /* nothing recognized? */
256 while (lisspace(cast_uchar(*endptr))) endptr++; /* skip trailing spaces */
257 return (*endptr == '\0') ? endptr : NULL; /* OK if no trailing characters */
258}
259
260
261/*

Callers 1

l_str2dFunction · 0.85

Calls 1

lua_strx2numberFunction · 0.85

Tested by

no test coverage detected