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

Method indexOf

valdi_core/src/valdi_core/cpp/Utils/StringBox.cpp:87–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87std::optional<size_t> StringBox::indexOf(char character) const noexcept {
88 auto index = toStringView().find(character);
89 if (index == std::string_view::npos) {
90 return std::nullopt;
91 }
92
93 return {index};
94}
95
96std::optional<size_t> StringBox::lastIndexOf(char character) const noexcept {
97 auto index = toStringView().rfind(character);

Callers 15

deserializeValueFunction · 0.45
parseMethod · 0.45
waitForSourceMethod · 0.45
_getLocationMethod · 0.45
completion.test.tsFile · 0.45
urlToAbsolutePathMethod · 0.45
argsToMapFunction · 0.45
setParentMethod · 0.45
setParentMethod · 0.45
listProcessesFunction · 0.45
createParserMethod · 0.45
createParserMethod · 0.45

Calls 1

findMethod · 0.45

Tested by 3

onDestroyMethod · 0.36
insertBeforeFunction · 0.36