MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / __hxcpp_parse_substr_float

Function __hxcpp_parse_substr_float

src/hx/StdLibs.cpp:756–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754
755
756double __hxcpp_parse_substr_float(const String &inString,int start, int length)
757{
758 if (start>=inString.length || length<1 || (start+length)>inString.length )
759 return Math_obj::NaN;
760
761 hx::strbuf buf;
762 const char *str = inString.ascii_substr(&buf,start,length);
763 char *end = (char *)str;
764 double result = str ? strtod(str,&end) : 0;
765
766 if (end==str)
767 return Math_obj::NaN;
768
769 return result;
770}
771
772
773double __hxcpp_parse_float(const String &inString)

Callers

nothing calls this directly

Calls 1

ascii_substrMethod · 0.80

Tested by

no test coverage detected