@@ -351,131 +351,6 @@ namespace mgis {
351351 return find_first_of (basic_string_view<CharT, Traits>(s), pos);
352352 }
353353
354- // --------------------------------------------------------------------------
355-
356- template <typename CharT, typename Traits>
357- inline typename basic_string_view<CharT, Traits>::size_type
358- basic_string_view<CharT, Traits>::find_last_of(basic_string_view v,
359- size_type pos) const {
360- if (this ->empty ()) {
361- return npos;
362- }
363- if (pos >= size ()) {
364- return find_last_of (v, this ->size () - 1 );
365- }
366- const auto p =
367- std::find_first_of (const_reverse_iterator (this ->cbegin () + pos + 1 ),
368- this ->crend (), v.cbegin (), v.cend (), Traits::eq);
369- if (p == this ->crend ()) {
370- return npos;
371- }
372- return static_cast <size_type>(this ->crend () - p - 1 );
373- }
374-
375- template <typename CharT, typename Traits>
376- inline typename basic_string_view<CharT, Traits>::size_type
377- basic_string_view<CharT, Traits>::find_last_of(char_type c,
378- size_type pos) const {
379- return find_last_of (basic_string_view<CharT, Traits>(&c, 1 ), pos);
380- }
381-
382- template <typename CharT, typename Traits>
383- inline typename basic_string_view<CharT, Traits>::size_type
384- basic_string_view<CharT, Traits>::find_last_of(const char_type* s,
385- size_type pos,
386- size_type count) const {
387- return find_last_of (basic_string_view<CharT, Traits>(s, count), pos);
388- }
389-
390- template <typename CharT, typename Traits>
391- inline typename basic_string_view<CharT, Traits>::size_type
392- basic_string_view<CharT, Traits>::find_last_of(const char_type* s,
393- size_type pos) const {
394- return find_last_of (basic_string_view<CharT, Traits>(s), pos);
395- }
396-
397- // --------------------------------------------------------------------------
398-
399- template <typename CharT, typename Traits>
400- inline typename basic_string_view<CharT, Traits>::size_type
401- basic_string_view<CharT, Traits>::find_first_not_of(basic_string_view v,
402- size_type pos) const {
403- for (size_type i = pos; i < m_size; ++i) {
404- for (size_type j = 0 ; j < v.size (); ++j) {
405- if (v[j] == m_str[i]) {
406- break ;
407- }
408- return i;
409- }
410- }
411- return npos;
412- }
413-
414- template <typename CharT, typename Traits>
415- inline typename basic_string_view<CharT, Traits>::size_type
416- basic_string_view<CharT, Traits>::find_first_not_of(char_type c,
417- size_type pos) const {
418- return find_first_not_of (basic_string_view<CharT, Traits>(&c, 1 ), pos);
419- }
420-
421- template <typename CharT, typename Traits>
422- inline typename basic_string_view<CharT, Traits>::size_type
423- basic_string_view<CharT, Traits>::find_first_not_of(const char_type* s,
424- size_type pos,
425- size_type count) const {
426- return find_first_not_of (basic_string_view<CharT, Traits>(s, count), pos);
427- }
428-
429- template <typename CharT, typename Traits>
430- inline typename basic_string_view<CharT, Traits>::size_type
431- basic_string_view<CharT, Traits>::find_first_not_of(const char_type* s,
432- size_type pos) const {
433- return find_first_not_of (basic_string_view<CharT, Traits>(s), pos);
434- }
435-
436- // --------------------------------------------------------------------------
437-
438- template <typename CharT, typename Traits>
439- inline typename basic_string_view<CharT, Traits>::size_type
440- basic_string_view<CharT, Traits>::find_last_not_of(basic_string_view v,
441- size_type pos) const {
442- if (this ->empty ()) {
443- return npos;
444- }
445- if (pos >= this ->size ()) {
446- return this ->find_last_not_of (v, size () - 1 );
447- }
448- const auto p =
449- std::find_if (const_reverse_iterator (this ->cbegin () + pos + 1 ),
450- this ->crend (), not_in_view (v));
451- if (p == this ->crend ()) {
452- return npos;
453- }
454- return static_cast <size_type>(this ->crend () - p - 1 );
455- }
456-
457- template <typename CharT, typename Traits>
458- inline typename basic_string_view<CharT, Traits>::size_type
459- basic_string_view<CharT, Traits>::find_last_not_of(char_type c,
460- size_type pos) const {
461- return find_last_not_of (basic_string_view<CharT, Traits>(&c, 1 ), pos);
462- }
463-
464- template <typename CharT, typename Traits>
465- inline typename basic_string_view<CharT, Traits>::size_type
466- basic_string_view<CharT, Traits>::find_last_not_of(const char_type* s,
467- size_type pos,
468- size_type count) const {
469- return find_last_not_of (basic_string_view<CharT, Traits>(s, count), pos);
470- }
471-
472- template <typename CharT, typename Traits>
473- inline typename basic_string_view<CharT, Traits>::size_type
474- basic_string_view<CharT, Traits>::find_last_not_of(const char_type* s,
475- size_type pos) const {
476- return find_last_not_of (basic_string_view<CharT, Traits>(s), pos);
477- }
478-
479354 // --------------------------------------------------------------------------
480355 // Iterator
481356 // --------------------------------------------------------------------------
0 commit comments