// point.
std::optional<size_t> is_absolute_path_with_prefix(std::string_view path);
-// Return whether `ch` is a directory separator, i.e. '/' on POSIX systems and
-// '/' or '\\' on Windows systems.
-inline bool
-is_dir_separator(char ch)
-{
- return ch == '/'
-#ifdef _WIN32
- || ch == '\\'
-#endif
- ;
-}
-
// Construct a normalized native path.
//
// Example:
#endif
}
-TEST_CASE("Util::is_dir_separator")
-{
- CHECK(!Util::is_dir_separator('x'));
- CHECK(Util::is_dir_separator('/'));
-#ifdef _WIN32
- CHECK(Util::is_dir_separator('\\'));
-#else
- CHECK(!Util::is_dir_separator('\\'));
-#endif
-}
-
TEST_CASE("Util::make_relative_path")
{
using Util::make_relative_path;