add a _str user defined literal to create String

This commit is contained in:
Maxime Coste 2012-10-16 15:11:22 +02:00
parent 6ff6058ceb
commit 214baf4cdd

View File

@ -94,6 +94,11 @@ String int_to_str(int value);
int str_to_int(const String& str); int str_to_int(const String& str);
std::vector<String> split(const String& str, char separator); std::vector<String> split(const String& str, char separator);
inline String operator"" _str(const char* str, size_t)
{
return String(str);
}
} }
namespace std namespace std