sst-filters
Filters submodule for the Surge Synthesizer
Loading...
Searching...
No Matches
StringRef Class Reference

A non-owning string class (similar to the forthcoming std::string_view) Note that, because a StringRef may be a substring of another string, it may not be null terminated. More...

#include <catch2.hpp>

Public Types

using size_type = std::size_t
using const_iterator = const char*

Public Member Functions

constexpr StringRef () noexcept=default
 StringRef (char const *rawChars) noexcept
constexpr StringRef (char const *rawChars, size_type size) noexcept
 StringRef (std::string const &stdString) noexcept
 operator std::string () const
auto operator== (StringRef const &other) const noexcept -> bool
auto operator!= (StringRef const &other) const noexcept -> bool
auto operator[] (size_type index) const noexcept -> char
constexpr auto empty () const noexcept -> bool
constexpr auto size () const noexcept -> size_type
auto c_str () const -> char const *
auto substr (size_type start, size_type length) const noexcept -> StringRef
auto data () const noexcept -> char const *
constexpr auto isNullTerminated () const noexcept -> bool
constexpr const_iterator begin () const
constexpr const_iterator end () const

Detailed Description

A non-owning string class (similar to the forthcoming std::string_view) Note that, because a StringRef may be a substring of another string, it may not be null terminated.

Member Typedef Documentation

◆ size_type

using size_type = std::size_t

◆ const_iterator

using const_iterator = const char*

Constructor & Destructor Documentation

◆ StringRef() [1/4]

StringRef ( )
constexprdefaultnoexcept

◆ StringRef() [2/4]

StringRef ( char const * rawChars)
noexcept

References StringRef().

◆ StringRef() [3/4]

StringRef ( char const * rawChars,
size_type size )
constexprnoexcept

References size(), and StringRef().

◆ StringRef() [4/4]

StringRef ( std::string const & stdString)
noexcept

Member Function Documentation

◆ operator std::string()

operator std::string ( ) const
explicit

◆ operator==()

auto operator== ( StringRef const & other) const->bool
noexcept

References StringRef().

◆ operator!=()

auto operator!= ( StringRef const & other) const->bool
noexcept

References StringRef().

◆ operator[]()

auto operator[] ( size_type index) const->char
noexcept

◆ empty()

auto empty ( ) const->bool
constexprnoexcept

◆ size()

auto size ( ) const->size_type
constexprnoexcept

Referenced by StringRef().

◆ c_str()

auto c_str ( ) const->charconst *

◆ substr()

auto substr ( size_type start,
size_type length ) const->StringRef
noexcept

References StringRef(), and substr().

Referenced by substr().

◆ data()

auto data ( ) const->charconst *
noexcept

References data().

Referenced by data().

◆ isNullTerminated()

auto isNullTerminated ( ) const->bool
constexprnoexcept

References isNullTerminated().

Referenced by isNullTerminated().

◆ begin()

const_iterator begin ( ) const
constexpr

◆ end()

const_iterator end ( ) const
constexpr

The documentation for this class was generated from the following file: