size_type find_last_of()

in include/aws/crt/StringView.h [380:406]


            size_type find_last_of(const CharT *s, size_type pos, size_type n) const noexcept
            {
                if (!n || s == nullptr)
                {
                    return npos;
                }

                if (pos < m_size)
                {
                    ++pos;
                }
                else
                {
                    pos = m_size;
                }

                for (const CharT *ptr = m_data + pos; ptr != m_data;)
                {
                    const CharT *r = Traits::find(s, n, *--ptr);
                    if (r)
                    {
                        return static_cast<size_type>(ptr - m_data);
                    }
                }

                return npos;
            }