| 114 | |
| 115 | using transform_fn = std::function<std::string(const std::string&)>; |
| 116 | static string apply_transform(string & self, const transform_fn & fn) { |
| 117 | for (auto & part : self.parts) { |
| 118 | part.val = fn(part.val); |
| 119 | } |
| 120 | return self; |
| 121 | } |
| 122 | |
| 123 | string string::uppercase() { |
| 124 | return apply_transform(*this, [](const std::string & s) { |
no outgoing calls
no test coverage detected