MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / to_long

Function to_long

extlibs/vili/src/utils.cpp:139–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 }
138
139 long long to_long(std::string_view input)
140 {
141#ifdef __cpp_lib_to_chars
142 long long data_out;
143 std::from_chars(input.data(), input.data() + input.size(), data_out);
144 return data_out;
145#else
146 long long data_out = 0;
147 const char* str = input.data();
148 while (*str)
149 {
150 data_out = data_out * 10 + (*str++ - '0');
151 }
152 return data_out;
153#endif
154 }
155
156 std::string replace(
157 std::string subject, const std::string& search, const std::string& replace)

Callers 1

applyMethod · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected