aboutsummaryrefslogtreecommitdiff
path: root/butl/path.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'butl/path.ixx')
-rw-r--r--butl/path.ixx15
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);
+ }
}