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

Method lastIndexOf

valdi_core/src/valdi_core/cpp/Utils/StringBox.cpp:96–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96std::optional<size_t> StringBox::lastIndexOf(char character) const noexcept {
97 auto index = toStringView().rfind(character);
98 if (index == std::string_view::npos) {
99 return std::nullopt;
100 }
101
102 return {index};
103}
104
105std::optional<size_t> StringBox::find(const std::string_view& str) const noexcept {
106 auto index = toStringView().find(str);

Callers 13

getPosMethod · 0.80
parseSourceMappingUrlFunction · 0.80
previewExceptionFunction · 0.80
micromatch.jsFile · 0.80
registerAliasMethod · 0.80
getModuleNameFunction · 0.80
parentDirFunction · 0.80
loadLibFromJarPathMethod · 0.80
toFamilyNameFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected