29 const std::string::size_type pos = 0 ) {
31 if ( pos >= decay.
size() ) {
return decay; }
33 auto _p = std::string::npos;
34 Decays::CC::MapCC::const_iterator _i = map_.
end();
36 for (
auto ic = map_.begin(); map_.end() != ic; ++ic ) {
38 std::string::size_type p = decay.
find( ic->first, pos );
40 if ( std::string::npos == p ) {
continue; }
48 if ( std::string::npos == _p || map_.end() == _i ) {
return decay; }
52 aux.
replace( _p, _i->first.size(), _i->second );
55 _p += _i->second.size();
57 return _p < aux.
size() ? cc_( aux, map_, _p ) : aux;
70 return cc_( decay, { map_.
begin(), map_.
end() } );