DAW string_view
Classes | Namespaces | Macros | Functions | Variables
daw_string_view2.h File Reference
#include "daw_string_view2_fwd.h"
#include <daw/daw_algorithm.h>
#include <daw/daw_cpp_feature_check.h>
#include <daw/daw_exception.h>
#include <daw/daw_fnv1a_hash.h>
#include <daw/daw_generic_hash.h>
#include <daw/daw_logic.h>
#include <daw/daw_math.h>
#include <daw/daw_move.h>
#include <daw/daw_swap.h>
#include <daw/daw_traits.h>
#include <daw/impl/daw_string_impl.h>
#include <daw/iterator/daw_back_inserter.h>
#include <daw/iterator/daw_iterator.h>
#include <ciso646>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <iterator>
#include <limits>
#include <stdexcept>
#include <vector>

Go to the source code of this file.

Classes

struct  daw::sv2::any_of_t< CharT, needles >
 A predicate type used in the find based routine to return true when the element is one of the specified characters. More...
 
struct  daw::sv2::basic_string_view< CharT, BoundsType >
 The class template basic_string_view describes an object that can refer to a constant contiguous sequence of char-like objects with the first element of the sequence at position zero. More...
 
struct  std::hash< daw::sv2::basic_string_view< CharT, Bounds > >
 
struct  daw::sv2::nodiscard_t
 Tag type for specifying that the searched for term/item is not to be removed from string_view. More...
 
struct  daw::sv2::none_of_t< CharT, needles >
 A predicate type used in the find based routine to return true when the element is none of the specified characters. More...
 

Namespaces

namespace  daw
 
namespace  daw::sv2
 
namespace  daw::sv2::string_view_literals
 
namespace  std
 

Macros

#define DAW_REQ_CHAR_PTR(Pointer)
 Require a character pointer. More...
 
#define DAW_REQ_CONTIG_CHAR_RANGE(Range, CharT)
 Require a contiguous character range. More...
 
#define DAW_REQ_CONTIG_CHAR_RANGE_CTOR(Type)
 Require Type be constructable from a CharT const * and a size_type. More...
 
#define DAW_REQ_UNARY_PRED(Pred, Type)
 Require Pred to be a Unary Predicate. More...
 

Functions

template<typename CharT , std::size_t N>
 daw::sv2::basic_string_view (CharT const (&)[N]) -> basic_string_view< CharT, default_string_view_bounds_type >
 
template<typename CharT >
 daw::sv2::basic_string_view (CharT const *s, std::size_t count) -> basic_string_view< CharT >
 
constexpr string_view daw::sv2::string_view_literals::operator""_sv (char const *str, std::size_t len) noexcept
 
constexpr u16string_view daw::sv2::string_view_literals::operator""_sv (char16_t const *str, std::size_t len) noexcept
 
constexpr u32string_view daw::sv2::string_view_literals::operator""_sv (char32_t const *str, std::size_t len) noexcept
 
constexpr wstring_view daw::sv2::string_view_literals::operator""_sv (wchar_t const *str, std::size_t len) noexcept
 

Variables

template<auto needle, auto... needles>
static constexpr any_of_t< decltype(needle), needle, needles... > daw::sv2::any_of { }
 
constexpr nodiscard_t daw::sv2::nodiscard = nodiscard_t{ }
 
template<auto needle, auto... needles>
static constexpr none_of_t< decltype(needle), needle, needles... > daw::sv2::none_of { }
 

Macro Definition Documentation

◆ DAW_REQ_CHAR_PTR

#define DAW_REQ_CHAR_PTR (   Pointer)
Value:
std::enable_if_t<sv2_details::is_char_pointer_v<Pointer, const_pointer>, \
std::nullptr_t> = nullptr

Require a character pointer.

Parameters
Pointera const_pointer

◆ DAW_REQ_CONTIG_CHAR_RANGE

#define DAW_REQ_CONTIG_CHAR_RANGE (   Range,
  CharT 
)
Value:
std::enable_if_t<sv2_details::is_string_view_like<Range, CharT>::value, \
std::nullptr_t> = nullptr

Require a contiguous character range.

Parameters
Rangecontiguous range
CharTcharacter type of range elements

◆ DAW_REQ_CONTIG_CHAR_RANGE_CTOR

#define DAW_REQ_CONTIG_CHAR_RANGE_CTOR (   Type)
Value:
std::enable_if_t< \
sv2_details::is_contigious_range_constructible<Type, CharT>::value, \
std::nullptr_t> = nullptr

Require Type be constructable from a CharT const * and a size_type.

Parameters
TypeA type to construct from a pointer/size_type pair

◆ DAW_REQ_UNARY_PRED

#define DAW_REQ_UNARY_PRED (   Pred,
  Type 
)
Value:
std::enable_if_t<traits::is_unary_predicate_v<Pred, Type>, std::nullptr_t> = \
nullptr

Require Pred to be a Unary Predicate.

Parameters
PredUnary predicate
TypeParameter type of predicate