serial-port icon indicating copy to clipboard operation
serial-port copied to clipboard

Minor fix for some nice code. Thanks for sharing this on GitHub!

Open kd-boss opened this issue 3 years ago • 0 comments

std::search is much better and does precisely what you're looking for. this is in the 3_async folder, BufferedAsyncSerial.cpp file.

std::vector<char>::iterator BufferedAsyncSerial::findStringInVector(
        std::vector<char>& v,const std::string& s)
{
    if(s.size() == 0) return v.end(); 
    return search(v.begin(), v.end(), s.begin(), s.end()); 
}

kd-boss avatar Oct 10 '21 14:10 kd-boss