| 740 | } |
| 741 | |
| 742 | std::string File::extractPathFromFilename(const std::string& fullPath, const char* separator) { |
| 743 | if ((fullPath == "") || (fullPath.find(separator) == std::string::npos)) { |
| 744 | return fullPath; |
| 745 | } |
| 746 | std::size_t lastSlashAt = fullPath.find_last_of(separator); |
| 747 | if (lastSlashAt == 0) { |
| 748 | return std::string(separator); |
| 749 | } |
| 750 | return fullPath.substr(0, lastSlashAt + 1); |
| 751 | } |
| 752 | |
| 753 | void File::buildStrippedFilename(const char* filename, char buff[], std::size_t limit) { |
| 754 | std::size_t sizeOfFilename = strlen(filename); |
nothing calls this directly
no outgoing calls
no test coverage detected