| 135 | } |
| 136 | |
| 137 | std::string replaceCharacters(const std::string& str, const char* characters, const char replacement) |
| 138 | { |
| 139 | std::string result(str); |
| 140 | size_t pos = result.find_first_of(characters); |
| 141 | while (pos != std::string::npos) |
| 142 | { |
| 143 | result[pos] = replacement; |
| 144 | pos = result.find_first_of(characters, pos); |
| 145 | } |
| 146 | return result; |
| 147 | } |
| 148 | |
| 149 | std::string padStringToLength(const std::string& str, size_t length, char padding) |
| 150 | { |
no outgoing calls