eina-cxx: Add c_str() to string_view

This commit is contained in:
Felipe Magno de Almeida 2016-06-06 02:49:47 -03:00
parent fec589cbdc
commit 7e1ce2d33d
1 changed files with 2 additions and 18 deletions

View File

@ -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);