MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / parseIndex

Function parseIndex

plugins/wasmedge_tensorflow/tensorflow_func.cpp:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57std::pair<std::string, int> parseIndex(std::string_view Name) {
58 // Check if there's index in the string key.
59 size_t Pos = Name.find(":");
60 int Idx = 0;
61 std::string NameStr;
62 if (Pos != std::string::npos) {
63 Idx = std::strtol(Name.data() + Pos + 1, nullptr, 10);
64 NameStr = Name.substr(0, Pos);
65 } else {
66 NameStr = Name;
67 }
68 return std::make_pair(NameStr, Idx);
69}
70
71} // namespace
72

Callers 1

bodyMethod · 0.85

Calls 3

substrMethod · 0.80
findMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected