MCPcopy Create free account
hub / github.com/SpartanJ/eepp / cmdGrep

Method cmdGrep

src/eepp/ui/uiconsole.cpp:691–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691void UIConsole::cmdGrep( const std::vector<String>& params ) {
692 if ( params.empty() )
693 return;
694 bool caseSensitive = !std::any_of( params.begin(), params.end(),
695 []( const auto& other ) { return "-i" == other; } );
696 String search = params[params.size() - 1];
697
698 if ( caseSensitive ) {
699 for ( const auto& cmd : mCmdLog )
700 if ( !cmd.log.empty() && cmd.log[0] != '>' && String::contains( cmd.log, search ) )
701 privPushText( String( cmd.log ) );
702 } else {
703 search.toLower();
704 for ( const auto& cmd : mCmdLog )
705 if ( !cmd.log.empty() && cmd.log[0] != '>' &&
706 String::contains( String::toLower( cmd.log ), search ) )
707 privPushText( String( cmd.log ) );
708 }
709}
710
711void UIConsole::cmdSetGamma( const std::vector<String>& params ) {
712 if ( params.size() >= 2 ) {

Callers

nothing calls this directly

Calls 6

toLowerMethod · 0.80
containsFunction · 0.50
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected