use Glib::UStringView in Glib::ustring API
Glib::UStringView
could replace const char*
, const Glib::ustring&
and const std::string&
in many of the Glib::ustring
methods. For example:
ustring(UStringView src);
ustring& operator=(UStringView src);
ustring& assign(UStringView src);
ustring& operator+=(UStringView src);
ustring& append(UStringView src);
ustring& insert(size_type i, UStringView src);
ustring& replace(size_type i, size_type n, UStringView src);
ustring& replace(iterator pbegin, iterator pend, UStringView src);
int compare(UStringView rhs) const;
int compare(size_type i, size_type n, UStringView rhs) const;
operator==(const ustring& lhs, UStringView rhs);
operator==(UStringView lhs, const ustring& rhs);
operator!=(const ustring& lhs, UStringView rhs);
operator!=(UStringView lhs, const ustring& rhs);
operator<(const ustring& lhs, UStringView rhs);
operator<(UStringView lhs, const ustring& rhs);
operator>(const ustring& lhs, UStringView rhs);
operator>(UStringView lhs, const ustring& rhs);
operator<=(const ustring& lhs, UStringView rhs);
operator<=(UStringView lhs, const ustring& rhs);
operator>=(const ustring& lhs, UStringView rhs);
operator>=(UStringView lhs, const ustring& rhs);
I'd be happy to contribute with a merge request, if this proposal is accepted.