| 211 | } |
| 212 | |
| 213 | void find_replace(char *str, char *orig, char *rep, char *output) |
| 214 | { |
| 215 | char buffer[4096] = {0}; |
| 216 | char *p; |
| 217 | |
| 218 | sprintf(buffer, "%s", str); |
| 219 | if(!(p = strstr(buffer, orig))){ // Is 'orig' even in 'str'? |
| 220 | sprintf(output, "%s", str); |
| 221 | return; |
| 222 | } |
| 223 | |
| 224 | *p = '\0'; |
| 225 | |
| 226 | sprintf(output, "%s%s%s", buffer, rep, p+strlen(orig)); |
| 227 | } |
| 228 | |
| 229 | float sec(clock_t clocks) |
| 230 | { |
no outgoing calls
no test coverage detected