| 61 | namespace Util { namespace String { |
| 62 | |
| 63 | string replace(const string& s, char a, char b) { |
| 64 | string r = s; |
| 65 | size_t i = r.find_first_of(a); |
| 66 | while (i != string::npos) { |
| 67 | r[i++] = b; |
| 68 | i = r.find_first_of(a, i); |
| 69 | } |
| 70 | return r; |
| 71 | } |
| 72 | |
| 73 | std::string ratio_percentage(const double x, const double y) { |
| 74 | stringstream ss; |
no outgoing calls
no test coverage detected