From 6efb1b1ce3901c7d90402e8e828b07977fe425d0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 9 Jul 2016 11:24:11 +0200 Subject: Add path::operator=/(string), path::size() --- butl/path.ixx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'butl/path.ixx') 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 + inline void basic_path:: + 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); + } } -- cgit v1.1