+ allocator_type get_allocator() const noexcept
+ {
+ return m_allocator;
+ }
+ size_type copy(charT* s, size_type len, size_type pos = 0) const;
+
+ size_type find(const basic_string& str, size_type pos = 0) const noexcept;
+ size_type find(const charT* s, size_type pos = 0) const;
+ size_type find(const charT* s, size_type pos, size_type n) const;
+ size_type find(charT c, size_type pos = 0) const noexcept;
+
+ size_type rfind(const basic_string& str, size_type pos = 0) const noexcept;
+ size_type rfind(const charT* s, size_type pos = 0) const;
+ size_type rfind(const charT* s, size_type pos, size_type n) const;
+ size_type rfind(charT c, size_type pos = 0) const noexcept;
+
+ size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept;
+ size_type find_first_of(const charT* s, size_type pos = 0) const;
+ size_type find_first_of(const charT* s, size_type pos, size_type n) const;
+ size_type find_first_of(charT c, size_type pos = 0) const noexcept;
+
+ size_type find_last_of(const basic_string& str, size_type pos = 0) const noexcept;
+ size_type find_last_of(const charT* s, size_type pos = 0) const;
+ size_type find_last_of(const charT* s, size_type pos, size_type n) const;
+ size_type find_last_of(charT c, size_type pos = 0) const noexcept;
+
+ size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept;
+ size_type find_first_not_of(const charT* s, size_type pos = 0) const;
+ size_type find_first_not_of(const charT* s, size_type pos, size_type n) const;
+ size_type find_first_not_of(charT c, size_type pos = 0) const noexcept;
+
+ size_type find_last_not_of(const basic_string& str, size_type pos = 0) const noexcept;
+ size_type find_last_not_of(const charT* s, size_type pos = 0) const;
+ size_type find_last_not_of(const charT* s, size_type pos, size_type n) const;
+ size_type find_last_not_of(charT c, size_type pos = 0) const noexcept;
+
+ basic_string substr(size_type pos = 0, size_type len = npos) const;
+
+ int compare(const basic_string& str) const noexcept {
+ return compare(0, size(), str.data(), str.size());
+ }
+ int compare(size_type pos, size_type len, const basic_string& str) const {
+ _libcxx_assert(pos <= size());
+ _libcxx_assert(len <= size());
+ _libcxx_assert(pos+len <= size());
+ return compare(pos, len, str.data(), str.size());
+ }
+ int compare(size_type pos, size_type len, const basic_string& str, size_type subpos, size_type sublen) const {
+ // TODO: check
+ _libcxx_assert(subpos <= str.size());
+ _libcxx_assert(sublen <= str.size());
+ _libcxx_assert(subpos+sublen <= str.size());
+ return compare(pos, len, str.data()+subpos, sublen);
+ }
+ int compare(const charT* s) const {
+ return compare(0, npos, s, traits::length(s));
+ }
+ int compare(size_type pos, size_type len, const charT* s) const {
+ return compare(pos, len, s, traits::length(s));
+ }
+ int compare(size_type pos, size_type len, const charT* s, size_type n) const {
+ if( n <= len ) {
+ int rv = traits::compare(data()+pos, s, n);
+ if( rv == 0 && n < len ) {
+ rv = -1;
+ }
+ return rv;
+ }
+ else {
+ int rv = traits::compare(data()+pos, s, len);
+ if(rv == 0) {
+ rv = 1;
+ }
+ return rv;
+ }
+ }