mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::js: Add an inefficient std::u16string conversion for string.
This commit is contained in:
parent
f92f117edc
commit
a3c06466fb
1 changed files with 8 additions and 0 deletions
|
@ -59,6 +59,7 @@ struct string
|
|||
char16_t operator[](const size_t &at) const;
|
||||
|
||||
operator std::string() const;
|
||||
operator std::u16string() const;
|
||||
operator JS::Value() const;
|
||||
|
||||
using root<JSString *, L>::root;
|
||||
|
@ -288,6 +289,13 @@ const
|
|||
return native(this->get());
|
||||
}
|
||||
|
||||
template<lifetime L>
|
||||
string<L>::operator std::u16string()
|
||||
const
|
||||
{
|
||||
return locale::char16::conv(native(this->get()));
|
||||
}
|
||||
|
||||
template<lifetime L>
|
||||
char *
|
||||
string<L>::c_str()
|
||||
|
|
Loading…
Reference in a new issue