Something like this should work (untested):
std::string::const_iterator it_begin = s.begin();
std::string::const_iterator it_end = s.end();
std::string del = "$deli";
while ( (it_begin = std::search(it_begin, it_end, del.begin(), del.end()))
!= it_end ) {
it_begin += del.size();
std::cout << std::string( it_begin, it_end );
}
This calls std::search
repeatedly until there's no delimiter left to be found in the string. Note the increment of the resulting iterator - this is to avoid infinite loop.
EDIT: Tested live example.