eina-cxx: Add c_str() to string_view
This commit is contained in:
parent
fec589cbdc
commit
7e1ce2d33d
|
@ -250,30 +250,14 @@ public:
|
|||
return to_string();
|
||||
}
|
||||
|
||||
CharT const* c_str() const noexcept { return data(); }
|
||||
|
||||
template<typename Allocator>
|
||||
operator std::basic_string<CharT, Traits, Allocator>() const
|
||||
{
|
||||
return std::basic_string<CharT, Traits, Allocator>(_str, _len);
|
||||
}
|
||||
|
||||
// Modifiers:
|
||||
// void clear() noexcept { _len = 0; }
|
||||
//
|
||||
// void remove_prefix(size_type n) noexcept
|
||||
// {
|
||||
// if (n > _len)
|
||||
// n = _len;
|
||||
// _str += n;
|
||||
// _len -= n;
|
||||
// }
|
||||
//
|
||||
// void remove_suffix(size_type n) noexcept
|
||||
// {
|
||||
// if (n > _len)
|
||||
// n = _len;
|
||||
// _len -= n;
|
||||
// }
|
||||
|
||||
void swap(basic_string_view<CharT, Traits>& s)
|
||||
{
|
||||
std::swap(_str, s._str);
|
||||
|
|
Loading…
Reference in New Issue