1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-26 13:02:01 +03:00

fix String::String(Codepoint, CharCount)

This commit is contained in:
Maxime Coste 2013-04-02 13:42:24 +02:00
parent 136f1a6284
commit b266035c71

View File

@ -20,7 +20,11 @@ public:
String(const char* content) : std::string(content) {}
String(std::string content) : std::string(std::move(content)) {}
explicit String(char content, CharCount count = 1) : std::string((size_t)(int)count, content) {}
explicit String(Codepoint cp, CharCount count = 1) { utf8::dump(back_inserter(*this), cp); }
explicit String(Codepoint cp, CharCount count = 1)
{
while (count-- > 0)
utf8::dump(back_inserter(*this), cp);
}
template<typename Iterator>
String(Iterator begin, Iterator end) : std::string(begin, end) {}