| 47 | } |
| 48 | |
| 49 | void StrReplaceAll(string *haystack, string needle, string s) { |
| 50 | string::size_type pos = 0; |
| 51 | while ((pos = haystack->find(needle, pos)) != string::npos) { |
| 52 | haystack->erase(pos, needle.length()); |
| 53 | haystack->insert(pos, s); |
| 54 | pos += s.length(); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | void StrAppendFormat(string *result, const char *fmt, ...) { |
| 59 | if (nullptr == fmt) |
no outgoing calls
no test coverage detected