diff --git a/ostd/string.hh b/ostd/string.hh index 57e6b59..3940daf 100644 --- a/ostd/string.hh +++ b/ostd/string.hh @@ -623,9 +623,9 @@ inline namespace literals { inline namespace string_literals { } } } -template -AnyString concat(AllocatorArg, const A &alloc, const T &v, const S &sep, - F func) { +template +AnyString concat(AllocatorArg, const A &alloc, const T &v, + ConstCharRange sep, F func) { AnyString ret(alloc); auto range = ostd::iter(v); if (range.empty()) return ret; @@ -638,9 +638,9 @@ AnyString concat(AllocatorArg, const A &alloc, const T &v, const S &sep, return ret; } -template +template AnyString concat(AllocatorArg, const A &alloc, const T &v, - const S &sep = " ") { + ConstCharRange sep = " ") { AnyString ret(alloc); auto range = ostd::iter(v); if (range.empty()) return ret; @@ -653,35 +653,35 @@ AnyString concat(AllocatorArg, const A &alloc, const T &v, return ret; } -template -String concat(const T &v, const S &sep, F func) { +template +String concat(const T &v, ConstCharRange sep, F func) { return concat(allocator_arg, typename String::Allocator(), v, sep, func); } -template -String concat(const T &v, const S &sep = " ") { +template +String concat(const T &v, ConstCharRange sep = " ") { return concat(allocator_arg, typename String::Allocator(), v, sep); } -template +template AnyString concat(AllocatorArg, const A &alloc, - std::initializer_list v, const S &sep, F func) { + std::initializer_list v, ConstCharRange sep, F func) { return concat(allocator_arg, alloc, ostd::iter(v), sep, func); } -template +template AnyString concat(AllocatorArg, const A &alloc, - std::initializer_list v, const S &sep = " ") { + std::initializer_list v, ConstCharRange sep = " ") { return concat(allocator_arg, alloc, ostd::iter(v), sep); } -template -String concat(std::initializer_list v, const S &sep, F func) { +template +String concat(std::initializer_list v, ConstCharRange sep, F func) { return concat(ostd::iter(v), sep, func); } -template -String concat(std::initializer_list v, const S &sep = " ") { +template +String concat(std::initializer_list v, ConstCharRange sep = " ") { return concat(ostd::iter(v), sep); }