| 322 | } |
| 323 | |
| 324 | void stripExtension(const char* srcPath, char* outPath) |
| 325 | { |
| 326 | // Find the last '.' in the name. |
| 327 | size_t len = strlen(srcPath); |
| 328 | s32 lastDot = -1; |
| 329 | for (size_t i = 0; i < len; i++) |
| 330 | { |
| 331 | if (srcPath[i] == '.') { lastDot = (s32)i; } |
| 332 | } |
| 333 | if (lastDot >= 0) |
| 334 | { |
| 335 | outPath[0] = 0; |
| 336 | strncpy(outPath, srcPath, lastDot); |
| 337 | outPath[lastDot] = 0; |
| 338 | } |
| 339 | else |
| 340 | { |
| 341 | strcpy(outPath, srcPath); |
| 342 | } |
| 343 | } |
| 344 | } |
no outgoing calls
no test coverage detected