_s literal for strings

master
Daniel Kolesa 2015-07-18 01:02:13 +01:00
parent a6584020a3
commit 53e292cdb0
1 changed files with 8 additions and 0 deletions

View File

@ -583,6 +583,14 @@ inline bool operator>=(const char *lhs, const StringBase<T, A> &rhs) {
return !(lhs < rhs);
}
/* string literals */
inline namespace literals { inline namespace string_literals {
String operator "" _s(const char *str, Size len) {
return String(str, len);
}
} }
template<typename A, typename T, typename F, typename S = const char *>
AnyString<A> concat(AllocatorArg, const A &alloc, const T &v, const S &sep,
F func) {