Returns the extension of the file
| 482 | |
| 483 | /// Returns the extension of the file |
| 484 | std::string getFileExtension(const char* filepath) { |
| 485 | if (!filepath) return ""; |
| 486 | |
| 487 | const char* dot = strrchr(filepath, '.'); |
| 488 | if (!dot || *(dot + 1) == '\0') return ""; // No point or nothing after that |
| 489 | |
| 490 | std::string ext(dot + 1); |
| 491 | // Optional: in lowercase letters |
| 492 | for (char& c : ext) c = std::tolower(static_cast<unsigned char>(c)); |
| 493 | return ext; |
| 494 | } |
| 495 | |
| 496 | // checks if given file is a las/laz file |
| 497 | bool IsLasLazFile(std::string fn) { |
nothing calls this directly
no outgoing calls
no test coverage detected