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

Function goto_keyword

src/geode/basic/file.cpp:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 std::string goto_keyword( std::ifstream& file, std::string_view word )
59 {
60 std::string line;
61 while( std::getline( file, line ) )
62 {
63 if( string_starts_with( line, word ) )
64 {
65 return line;
66 }
67 }
68 throw geode::OpenGeodeBasicException{ nullptr,
69 OpenGeodeException::TYPE::data,
70 "[goto_keyword] Cannot find the requested keyword: ", word };
71 return "";
72 }
73
74 std::string goto_keywords(
75 std::ifstream& file, absl::Span< const std::string_view > words )

Callers

nothing calls this directly

Calls 1

string_starts_withFunction · 0.85

Tested by

no test coverage detected