mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-25 21:16:38 +03:00
Add missing support for Codepoint in format
This commit is contained in:
parent
c1b9ea4d1e
commit
f87dbe410f
@ -151,6 +151,15 @@ InplaceString<24> to_string(float val)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InplaceString<8> to_string(Codepoint c)
|
||||||
|
{
|
||||||
|
InplaceString<8> res;
|
||||||
|
char* ptr = res.m_data;
|
||||||
|
utf8::dump(ptr, c);
|
||||||
|
res.m_length = (int)(ptr - res.m_data);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
bool subsequence_match(StringView str, StringView subseq)
|
bool subsequence_match(StringView str, StringView subseq)
|
||||||
{
|
{
|
||||||
auto it = str.begin();
|
auto it = str.begin();
|
||||||
|
@ -277,6 +277,7 @@ InplaceString<16> to_string(int val);
|
|||||||
InplaceString<24> to_string(size_t val);
|
InplaceString<24> to_string(size_t val);
|
||||||
InplaceString<24> to_string(Hex val);
|
InplaceString<24> to_string(Hex val);
|
||||||
InplaceString<24> to_string(float val);
|
InplaceString<24> to_string(float val);
|
||||||
|
InplaceString<8> to_string(Codepoint c);
|
||||||
|
|
||||||
template<typename RealType, typename ValueType>
|
template<typename RealType, typename ValueType>
|
||||||
decltype(to_string(std::declval<ValueType>()))
|
decltype(to_string(std::declval<ValueType>()))
|
||||||
|
Loading…
Reference in New Issue
Block a user