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

Function tryReadKebab

lib/validator/component_name.cpp:98–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98bool tryReadKebab(std::string_view &Input, std::string_view &Output) {
99 size_t Pos = 0;
100 while (Pos < Input.size()) {
101 if (isalnum(Input[Pos]) || Input[Pos] == '-') {
102 Pos++;
103 } else {
104 break;
105 }
106 }
107 Output = Input.substr(0, Pos);
108 Input.remove_prefix(Pos);
109 return isKebabString(Output);
110}
111
112// integrity-metadata = *WSP hash-with-options *(1*WSP hash-with-options) *WSP
113// hash-with-options = hash-expression *("?" option-expression)

Callers 1

parseMethod · 0.85

Calls 3

isKebabStringFunction · 0.85
substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected