serial-port
serial-port copied to clipboard
Minor fix for some nice code. Thanks for sharing this on GitHub!
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());
}