eina-cxx: Add c_str() to string_view
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Mon, 6 Jun 2016 05:49:47 +0000 (02:49 -0300)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Mon, 6 Jun 2016 05:49:47 +0000 (02:49 -0300)
src/bindings/cxx/eina_cxx/eina_string_view.hh

index cfa3ba0..265b7e1 100644 (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);