| 122 | namespace |
| 123 | { |
| 124 | void remove_value(std::string & s, std::string const & search_prefix, std::string const & search_suffix) |
| 125 | { |
| 126 | auto search_prefix_size = search_prefix.size(); |
| 127 | auto s1 = s.find(search_prefix); |
| 128 | if( s1 == s.npos ) |
| 129 | return; |
| 130 | auto search_prefix_end = s1 + search_prefix_size; |
| 131 | auto s2 = s.find(search_suffix, search_prefix_end); |
| 132 | if( s2 == s.npos ) |
| 133 | return; |
| 134 | s.replace(search_prefix_end, s2 - search_prefix_end, "<removed variance>"); |
| 135 | } |
| 136 | |
| 137 | void remove_variance(std::string & s) |
| 138 | { |