MCPcopy Create free account
hub / github.com/Tencent/TNN / CheckNumberString

Function CheckNumberString

tools/quantization/quantize.cc:156–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156bool CheckNumberString(std::string num_str) {
157 const char* num_char = num_str.c_str();
158
159 for (int i = 0; i < num_str.length(); ++i) {
160 if (!(num_char[i] >= '0' && num_char[i] <= '9') && num_char[i] != '.') {
161 return false;
162 }
163 }
164 return true;
165}
166
167bool CheckFileName(std::string name) {
168 std::ofstream write_stream;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected