diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-09 11:24:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-09 11:24:11 +0200 |
commit | 6efb1b1ce3901c7d90402e8e828b07977fe425d0 (patch) | |
tree | 66f79216ceaf346ffbca7f5926f40cfbbeb9b755 /butl/path.ixx | |
parent | 5b1c20f2315cd7fc624ffd31abdcc03b409bfcb2 (diff) |
Add path::operator=/(string), path::size()
Diffstat (limited to 'butl/path.ixx')
-rw-r--r-- | butl/path.ixx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/butl/path.ixx b/butl/path.ixx index 1628ece..48d6576 100644 --- a/butl/path.ixx +++ b/butl/path.ixx @@ -233,4 +233,19 @@ namespace butl return string (); } #endif + + template <typename C, typename K> + inline void basic_path<C, K>:: + combine (const C* r, size_type rn) + { + size_type ln (this->path_.size ()); + + if (ln != 0 && rn != 0) + { + if (!traits::is_separator (this->path_[ln - 1])) + this->path_ += traits::directory_separator; + } + + this->path_.append (r, rn); + } } |