| 603 | } |
| 604 | |
| 605 | static std::string_view::size_type GetLastSeperatorPosition(const std::string_view filename, bool include_separator) |
| 606 | { |
| 607 | std::string_view::size_type last_separator = filename.rfind('/'); |
| 608 | if (include_separator && last_separator != std::string_view::npos) |
| 609 | last_separator++; |
| 610 | |
| 611 | #if defined(_WIN32) |
| 612 | std::string_view::size_type other_last_separator = filename.rfind('\\'); |
| 613 | if (other_last_separator != std::string_view::npos) |
| 614 | { |
| 615 | if (include_separator) |
| 616 | other_last_separator++; |
| 617 | if (last_separator == std::string_view::npos || other_last_separator > last_separator) |
| 618 | last_separator = other_last_separator; |
| 619 | } |
| 620 | #endif |
| 621 | |
| 622 | return last_separator; |
| 623 | } |
| 624 | |
| 625 | std::string_view Path::GetDirectory(const std::string_view path) |
| 626 | { |
no test coverage detected