MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / parse_int64

Function parse_int64

src/framework/io/safetensors.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46int64_t parse_int64(const std::string & text, size_t & pos) {
47 skip_ws(text, pos);
48 size_t end = pos;
49 while (end < text.size() && (std::isdigit(static_cast<unsigned char>(text[end])) != 0 || text[end] == '-')) {
50 ++end;
51 }
52 if (end == pos) {
53 throw std::runtime_error("expected integer");
54 }
55 const auto value = std::stoll(text.substr(pos, end - pos));
56 pos = end;
57 return value;
58}
59
60std::vector<int64_t> parse_int_array(const std::string & text, size_t & pos) {
61 skip_ws(text, pos);

Callers 2

parse_int_arrayFunction · 0.85
skip_json_valueFunction · 0.85

Calls 2

skip_wsFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected