MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / goto_keywords

Function goto_keywords

src/geode/basic/file.cpp:74–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 std::string goto_keywords(
75 std::ifstream& file, absl::Span< const std::string_view > words )
76 {
77 std::string line;
78 while( std::getline( file, line ) )
79 {
80 for( const auto word : words )
81 {
82 if( string_starts_with( line, word ) )
83 {
84 return line;
85 }
86 }
87 }
88 throw geode::OpenGeodeBasicException{ nullptr,
89 OpenGeodeException::TYPE::data,
90 "[goto_keywords] Cannot find one of the requested keywords" };
91 return "";
92 }
93
94 std::optional< std::string > goto_keyword_if_it_exists(
95 std::ifstream& file, std::string_view word )

Callers

nothing calls this directly

Calls 1

string_starts_withFunction · 0.85

Tested by

no test coverage detected