LeechCraft  0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
LC::Util::CtString< N, Char > Struct Template Reference

#include "ctstring.h"

Public Types

using Char_t = Char
 

Public Member Functions

constexpr CtString () noexcept=default
 
constexpr CtString (RawStr< N+1, Char > s) noexcept
 
constexpr auto operator (const CtString &) const =default
 
template<size_t N2>
constexpr auto operator+ (const CtString< N2, Char > &s2) const noexcept
 
template<size_t N2>
constexpr auto operator+ (RawStr< N2, Char > s2) const noexcept
 
constexpr auto operator+ (Char ch) const noexcept
 
constexpr bool IsEmpty () const noexcept
 
constexpr bool EndsWith (Char ch) const noexcept requires(Size > 0)
 
template<size_t Count>
 requires (Count<=Size) const expr auto Chop() const noexcept
 
constexpr Char & operator[] (size_t pos) noexcept
 
constexpr Char operator[] (size_t pos) const noexcept
 

Static Public Member Functions

static constexpr auto FromUnsized (const Char *s) noexcept
 

Public Attributes

Char Data_ [Size] {}
 

Static Public Attributes

static constexpr size_t Size = N
 

Detailed Description

template<size_t N, typename Char = char>
struct LC::Util::CtString< N, Char >

Non-0-terminated compile-time string.

Template Parameters
NThe length of the string in Char.
CharThe underlying character type.

Definition at line 27 of file ctstring.h.

Member Typedef Documentation

◆ Char_t

template<size_t N, typename Char = char>
using LC::Util::CtString< N, Char >::Char_t = Char

Definition at line 29 of file ctstring.h.

Constructor & Destructor Documentation

◆ CtString() [1/2]

template<size_t N, typename Char = char>
constexpr LC::Util::CtString< N, Char >::CtString ( )
defaultnoexcept

◆ CtString() [2/2]

template<size_t N, typename Char = char>
constexpr LC::Util::CtString< N, Char >::CtString ( RawStr< N+1, Char >  s)
inlinenoexcept

Member Function Documentation

◆ EndsWith()

template<size_t N, typename Char = char>
constexpr bool LC::Util::CtString< N, Char >::EndsWith ( Char  ch) const
inlinenoexcept

◆ FromUnsized()

template<size_t N, typename Char = char>
static constexpr auto LC::Util::CtString< N, Char >::FromUnsized ( const Char *  s)
inlinestaticnoexcept

Definition at line 46 of file ctstring.h.

References LC::Util::CtString< N, Char >::Size.

Referenced by LC::Util::CtString< N, Char >::requires().

+ Here is the caller graph for this function:

◆ IsEmpty()

template<size_t N, typename Char = char>
constexpr bool LC::Util::CtString< N, Char >::IsEmpty ( ) const
inlinenoexcept

Definition at line 74 of file ctstring.h.

References LC::Util::CtString< N, Char >::Size.

◆ operator()

template<size_t N, typename Char = char>
constexpr auto LC::Util::CtString< N, Char >::operator ( const CtString< N, Char > &  ) const
default

◆ operator+() [1/3]

template<size_t N, typename Char = char>
template<size_t N2>
constexpr auto LC::Util::CtString< N, Char >::operator+ ( const CtString< N2, Char > &  s2) const
inlinenoexcept

◆ operator+() [2/3]

template<size_t N, typename Char = char>
template<size_t N2>
constexpr auto LC::Util::CtString< N, Char >::operator+ ( RawStr< N2, Char >  s2) const
inlinenoexcept

Definition at line 64 of file ctstring.h.

◆ operator+() [3/3]

template<size_t N, typename Char = char>
constexpr auto LC::Util::CtString< N, Char >::operator+ ( Char  ch) const
inlinenoexcept

Definition at line 69 of file ctstring.h.

◆ operator[]() [1/2]

template<size_t N, typename Char = char>
constexpr Char& LC::Util::CtString< N, Char >::operator[] ( size_t  pos)
inlinenoexcept

Definition at line 92 of file ctstring.h.

References LC::Util::CtString< N, Char >::Data_.

◆ operator[]() [2/2]

template<size_t N, typename Char = char>
constexpr Char LC::Util::CtString< N, Char >::operator[] ( size_t  pos) const
inlinenoexcept

Definition at line 97 of file ctstring.h.

References LC::Util::CtString< N, Char >::Data_.

◆ requires()

template<size_t N, typename Char = char>
template<size_t Count>
LC::Util::CtString< N, Char >::requires ( Count<=  Size) const
inlinenoexcept

Definition at line 86 of file ctstring.h.

References LC::Util::CtString< N, Char >::Data_, and LC::Util::CtString< N, Char >::FromUnsized().

+ Here is the call graph for this function:

Member Data Documentation

◆ Data_

◆ Size

template<size_t N, typename Char = char>
constexpr size_t LC::Util::CtString< N, Char >::Size = N
static

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