Beispiel #1
0
 size_type find_last_not_of (basic_string_view that) const {
   for (auto iter = this->rbegin(); iter != this->rend(); ++iter) {
     if (traits::find(that.data(), that.size(), *iter)) { continue; }
     return this->size() - std::distance(this->rbegin(), iter) - 1;
   }
   return npos;
 }
Beispiel #2
0
 bool ends_with (basic_string_view that) const noexcept {
   return this->size() >= that.size() and
     traits::compare(
       this->data() + this->size() - that.size(),
       that.data(),
       that.size()
     ) == 0;
 }
Beispiel #3
0
  difference_type compare (basic_string_view that) const {
    auto cmp = traits::compare(
      this->data(),
      that.data(),
      std::min(this->size(), that.size())
    );

    if (cmp != 0) { return cmp; }
    if (this->size() == that.size()) { return 0; }
    if (this->size() < that.size()) { return -1; }
    return 1;
  }
Beispiel #4
0
	size_t to_string(PrintOptions, format_appender<T>& app, basic_string_view<CharT, Traits> options)
	{
		app.append(options.data(), options.size());
		return options.size();
	}