MCPcopy Create free account
hub / github.com/Snapchat/Valdi / substr

Method substr

valdi_core/src/valdi_core/cpp/Utils/TextParser.cpp:79–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79std::string_view TextParser::substr(size_t from, size_t to) const {
80 SC_ASSERT(to >= from && from <= _str.size() && to <= _str.size());
81 return std::string_view(_str.data() + from, to - from);
82}
83
84bool TextParser::tryParse(char c) {
85 return tryParsePredicate([&](auto currentCharacter) { return currentCharacter == c; });

Callers 15

makeParseErrorMethod · 0.80
parseStringMethod · 0.80
getFileExtensionMethod · 0.80
trimEndFunction · 0.80
labelMethod · 0.80
stripBOMFunction · 0.80
stripBOMFunction · 0.80
createParserMethod · 0.80
createParserMethod · 0.80

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected