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

Function readUntil

lib/validator/component_name.cpp:77–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75bool isEOF(std::string_view Input) { return Input.empty(); }
76
77bool readUntil(std::string_view &Input, char Delim, std::string_view &Output) {
78 size_t Pos = Input.find(Delim);
79 if (Pos == Input.npos) {
80 return false;
81 }
82
83 Output = Input.substr(0, Pos);
84 Input.remove_prefix(Pos + 1);
85 return true;
86}
87
88bool tryRead(std::string_view Prefix, std::string_view &Name) {
89 if (Prefix.size() > Name.size())

Callers 3

tryParseIntegritySuffixFunction · 0.85
parsePkgPathFunction · 0.85
parseMethod · 0.85

Calls 2

substrMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected