diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-28 11:05:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-28 11:05:00 +0200 |
commit | 7508f6f84f44a28151def5da5f6ea434d670df60 (patch) | |
tree | 16ee7e6c49d71bfd242b4b930dd5841ebb1686df /butl/path | |
parent | 6abd3d57f666ce1cd4c4c792e649fd313bee22ad (diff) |
Add path::traits::absolute()
Diffstat (limited to 'butl/path')
-rw-r--r-- | butl/path | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -105,6 +105,16 @@ namespace butl #endif } + static bool + absolute (const string_type& s) + { +#ifdef _WIN32 + return s.size () > 1 && s[1] == ':'; +#else + return s.size () != 0 && is_separator (s[0]); +#endif + } + static size_type find_separator (string_type const& s, size_type pos = 0, |