qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::string< _Size > Class Template Reference

Fixed-size string with optimized storage. More...

#include <string.h>

Inheritance diagram for qb::string< _Size >:
Collaboration diagram for qb::string< _Size >:

Public Types

using value_type = char
using reference = char&
using const_reference = const char&
using pointer = char*
using const_pointer = const char*
using iterator = typename base_t::iterator
using const_iterator = typename base_t::const_iterator
using reverse_iterator = typename base_t::reverse_iterator
using const_reverse_iterator = typename base_t::const_reverse_iterator
using difference_type = typename base_t::difference_type

Public Member Functions

constexpr string () noexcept
 Default constructor.
template<std::size_t N>
constexpr string (const char(&str)[N]) noexcept
 Constructor from C-style string literal.
template<typename T>
 string (T const &rhs) noexcept
 Constructor from string-like object.
 string (const char *str, std::size_t size) noexcept
 Constructor from C-style string and size.
 string (const char *str) noexcept
 Constructor from C-style string.
 string (std::size_t count, char ch) noexcept
 Fill constructor.
 string (const string &other) noexcept=default
 Copy constructor.
 string (string &&other) noexcept=default
 Move constructor.
stringoperator= (const string &other) noexcept=default
 Copy assignment operator.
stringoperator= (string &&other) noexcept=default
 Move assignment operator.
stringassign (char const *rhs, std::size_t size) noexcept
 Assign from C-style string and size.
template<std::size_t N>
constexpr stringassign (const char(&str)[N]) noexcept
 Assign from C-style string literal.
template<typename T>
stringassign (T const &rhs) noexcept
 Assign from string-like object.
stringassign (char const *rhs) noexcept
 Assign from C-style string.
stringassign (std::size_t count, char ch) noexcept
 Assign with fill.
template<std::size_t N>
constexpr stringoperator= (const char(&str)[N]) noexcept
 Assignment operator for C-style string literals.
template<typename T>
stringoperator= (T const &rhs) noexcept
 Assignment operator for string-like objects.
stringoperator= (char const *rhs) noexcept
 Assignment operator for C-style strings.
stringoperator= (char ch) noexcept
 Assignment operator for single character.
 operator std::string () const noexcept
 Conversion operator to std::string.
 operator std::string_view () const noexcept
 Conversion operator to std::string_view.
reference at (std::size_t pos)
 Access character at index with bounds checking.
const_reference at (std::size_t pos) const
 Access character at index with bounds checking (const version)
reference operator[] (std::size_t pos) noexcept
 Access character at index (no bounds checking)
const_reference operator[] (std::size_t pos) const noexcept
 Access character at index (no bounds checking, const version)
reference front () noexcept
 Access first character.
const_reference front () const noexcept
 Access first character (const version)
reference back () noexcept
 Access last character.
const_reference back () const noexcept
 Access last character (const version)
pointer data () noexcept
 Get pointer to underlying data.
const_pointer data () const noexcept
 Get pointer to underlying data (const version)
const_pointer c_str () const noexcept
 Get C-style string representation.
iterator end () noexcept
 Get iterator to the end of the string.
const_iterator end () const noexcept
 Get const iterator to the end of the string.
const_iterator cend () const noexcept
 Get const iterator to the end of the string.
reverse_iterator rbegin () noexcept
 Get reverse iterator to the beginning of the string.
const_reverse_iterator rbegin () const noexcept
 Get const reverse iterator to the beginning of the string.
const_reverse_iterator crbegin () const noexcept
 Get const reverse iterator to the beginning of the string.
constexpr bool empty () const noexcept
 Check if the string is empty.
constexpr std::size_t size () const noexcept
 Get the string length.
constexpr std::size_t length () const noexcept
 Get the string length (alias for size())
constexpr std::size_t max_size () const noexcept
 Get the maximum possible size.
constexpr std::size_t capacity () const noexcept
 Get the capacity.
void clear () noexcept
 Clear the string.
void resize (std::size_t count, char ch='\0') noexcept
 Resize the string.
void swap (string &other) noexcept
 Swap contents with another string.
string substr (std::size_t pos=0, std::size_t len=npos) const
 Extract substring.
int compare (const string &str) const noexcept
 Compare with another string.
int compare (const char *str) const noexcept
 Compare with C-style string.
int compare (std::size_t pos, std::size_t len, const string &str) const
 Compare substring with another string.
std::size_t find (const string &str, std::size_t pos=0) const noexcept
 Find substring.
std::size_t find (const char *str, std::size_t pos=0) const noexcept
 Find C-style string.
std::size_t find (char ch, std::size_t pos=0) const noexcept
 Find character.
std::size_t rfind (const char *str, std::size_t pos=npos) const noexcept
 Find last occurrence of substring.
std::size_t rfind (char ch, std::size_t pos=npos) const noexcept
 Find last occurrence of character.
stringappend (const string &str) noexcept
 Append string.
stringappend (const char *str) noexcept
 Append C-style string.
stringappend (const char *str, std::size_t len) noexcept
 Append C-style string with length.
stringappend (char ch) noexcept
 Append character.
stringappend (std::size_t count, char ch) noexcept
 Append multiple characters.
void push_back (char ch) noexcept
 Add character to end.
void pop_back () noexcept
 Remove last character.
stringoperator+= (const string &str) noexcept
 Append operator.
stringoperator+= (const char *str) noexcept
 Append operator for C-style string.
stringoperator+= (char ch) noexcept
 Append operator for character.
bool starts_with (const char *prefix) const noexcept
 Check if string starts with given prefix.
bool starts_with (const string &prefix) const noexcept
 Check if string starts with given prefix.
bool starts_with (char ch) const noexcept
 Check if string starts with given character.
bool ends_with (const char *suffix) const noexcept
 Check if string ends with given suffix.
bool ends_with (const string &suffix) const noexcept
 Check if string ends with given suffix.
bool ends_with (char ch) const noexcept
 Check if string ends with given character.
bool contains (const char *str) const noexcept
 Check if string contains given substring.
bool contains (const string &str) const noexcept
 Check if string contains given substring.
bool contains (char ch) const noexcept
 Check if string contains given character.
template<typename T>
bool operator== (T const &rhs) const noexcept
 Equality comparison with string-like object.
bool operator== (char const *rhs) const noexcept
 Equality comparison with C-style string.
bool operator== (const string &rhs) const noexcept
 Equality comparison with another qb::string.
bool operator!= (const string &rhs) const noexcept
 Inequality comparison.
bool operator!= (const char *rhs) const noexcept
 Inequality comparison with C-style string.
bool operator< (const string &rhs) const noexcept
 Less than comparison.
bool operator< (const char *rhs) const noexcept
 Less than comparison with C-style string.
bool operator> (const string &rhs) const noexcept
 Greater than comparison.
bool operator> (const char *rhs) const noexcept
 Greater than comparison with C-style string.
bool operator<= (const string &rhs) const noexcept
 Less than or equal comparison.
bool operator<= (const char *rhs) const noexcept
 Less than or equal comparison with C-style string.
bool operator>= (const string &rhs) const noexcept
 Greater than or equal comparison.
bool operator>= (const char *rhs) const noexcept
 Greater than or equal comparison with C-style string.

Static Public Attributes

static constexpr std::size_t npos = std::numeric_limits<std::size_t>::max()

Detailed Description

template<std::size_t _Size = 30>
class qb::string< _Size >

Fixed-size string with optimized storage.

A string class with a fixed maximum capacity that is more efficient than std::string for small strings. It uses a std::array for storage and provides common string operations with bounds checking.

Template Parameters
_SizeMaximum size of the string (default: 30)

Constructor & Destructor Documentation

◆ string() [1/6]

template<std::size_t _Size = 30>
qb::string< _Size >::string ( )
inlineconstexprnoexcept

Default constructor.

Creates an empty string with a null terminator

◆ string() [2/6]

template<std::size_t _Size = 30>
template<std::size_t N>
qb::string< _Size >::string ( const char(&) str[N])
inlineconstexprnoexcept

Constructor from C-style string literal.

Template Parameters
NSize of the string literal including null terminator
Parameters
strThe string literal to copy

◆ string() [3/6]

template<std::size_t _Size = 30>
template<typename T>
qb::string< _Size >::string ( T const & rhs)
inlinenoexcept

Constructor from string-like object.

Template Parameters
TType with c_str() and size() methods (e.g., std::string)
Parameters
rhsString-like object to copy

◆ string() [4/6]

template<std::size_t _Size = 30>
qb::string< _Size >::string ( const char * str,
std::size_t size )
inlinenoexcept

Constructor from C-style string and size.

Parameters
strC-style string to copy from
sizeNumber of characters to copy

◆ string() [5/6]

template<std::size_t _Size = 30>
qb::string< _Size >::string ( const char * str)
inlinenoexcept

Constructor from C-style string.

Parameters
strNull-terminated C-style string

◆ string() [6/6]

template<std::size_t _Size = 30>
qb::string< _Size >::string ( std::size_t count,
char ch )
inlinenoexcept

Fill constructor.

Parameters
countNumber of characters to fill
chCharacter to fill with

Member Function Documentation

◆ assign() [1/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::assign ( char const * rhs,
std::size_t size )
inlinenoexcept

Assign from C-style string and size.

Parameters
rhsC-style string to copy from
sizeNumber of characters to copy
Returns
Reference to this string

◆ assign() [2/5]

template<std::size_t _Size = 30>
template<std::size_t N>
string & qb::string< _Size >::assign ( const char(&) str[N])
inlineconstexprnoexcept

Assign from C-style string literal.

Template Parameters
NSize of the string literal including null terminator
Parameters
strThe string literal to copy
Returns
Reference to this string

◆ assign() [3/5]

template<std::size_t _Size = 30>
template<typename T>
string & qb::string< _Size >::assign ( T const & rhs)
inlinenoexcept

Assign from string-like object.

Template Parameters
TType with c_str() and size() methods
Parameters
rhsString-like object to copy
Returns
Reference to this string

◆ assign() [4/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::assign ( char const * rhs)
inlinenoexcept

Assign from C-style string.

Parameters
rhsNull-terminated C-style string
Returns
Reference to this string

◆ assign() [5/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::assign ( std::size_t count,
char ch )
inlinenoexcept

Assign with fill.

Parameters
countNumber of characters to assign
chCharacter to fill with
Returns
Reference to this string

◆ operator=() [1/4]

template<std::size_t _Size = 30>
template<std::size_t N>
string & qb::string< _Size >::operator= ( const char(&) str[N])
inlineconstexprnoexcept

Assignment operator for C-style string literals.

Template Parameters
NSize of the string literal including null terminator
Parameters
strThe string literal to assign
Returns
Reference to this string

◆ operator=() [2/4]

template<std::size_t _Size = 30>
template<typename T>
string & qb::string< _Size >::operator= ( T const & rhs)
inlinenoexcept

Assignment operator for string-like objects.

Template Parameters
TType with c_str() and size() methods
Parameters
rhsString-like object to assign
Returns
Reference to this string

◆ operator=() [3/4]

template<std::size_t _Size = 30>
string & qb::string< _Size >::operator= ( char const * rhs)
inlinenoexcept

Assignment operator for C-style strings.

Parameters
rhsNull-terminated C-style string to assign
Returns
Reference to this string

◆ operator=() [4/4]

template<std::size_t _Size = 30>
string & qb::string< _Size >::operator= ( char ch)
inlinenoexcept

Assignment operator for single character.

Parameters
chCharacter to assign
Returns
Reference to this string

◆ operator std::string()

template<std::size_t _Size = 30>
qb::string< _Size >::operator std::string ( ) const
inlinenoexcept

Conversion operator to std::string.

Returns
A std::string copy of this string

◆ operator std::string_view()

template<std::size_t _Size = 30>
qb::string< _Size >::operator std::string_view ( ) const
inlinenoexcept

Conversion operator to std::string_view.

Returns
A std::string_view referring to this string

◆ at() [1/2]

template<std::size_t _Size = 30>
reference qb::string< _Size >::at ( std::size_t pos)
inline

Access character at index with bounds checking.

Parameters
posIndex of the character
Returns
Reference to the character
Exceptions
std::out_of_rangeif pos >= size()

◆ at() [2/2]

template<std::size_t _Size = 30>
const_reference qb::string< _Size >::at ( std::size_t pos) const
inline

Access character at index with bounds checking (const version)

Parameters
posIndex of the character
Returns
Const reference to the character
Exceptions
std::out_of_rangeif pos >= size()

◆ operator[]() [1/2]

template<std::size_t _Size = 30>
reference qb::string< _Size >::operator[] ( std::size_t pos)
inlinenoexcept

Access character at index (no bounds checking)

Parameters
posIndex of the character
Returns
Reference to the character

◆ operator[]() [2/2]

template<std::size_t _Size = 30>
const_reference qb::string< _Size >::operator[] ( std::size_t pos) const
inlinenoexcept

Access character at index (no bounds checking, const version)

Parameters
posIndex of the character
Returns
Const reference to the character

◆ front() [1/2]

template<std::size_t _Size = 30>
reference qb::string< _Size >::front ( )
inlinenoexcept

Access first character.

Returns
Reference to the first character

◆ front() [2/2]

template<std::size_t _Size = 30>
const_reference qb::string< _Size >::front ( ) const
inlinenoexcept

Access first character (const version)

Returns
Const reference to the first character

◆ back() [1/2]

template<std::size_t _Size = 30>
reference qb::string< _Size >::back ( )
inlinenoexcept

Access last character.

Returns
Reference to the last character

◆ back() [2/2]

template<std::size_t _Size = 30>
const_reference qb::string< _Size >::back ( ) const
inlinenoexcept

Access last character (const version)

Returns
Const reference to the last character

◆ data() [1/2]

template<std::size_t _Size = 30>
pointer qb::string< _Size >::data ( )
inlinenoexcept

Get pointer to underlying data.

Returns
Pointer to the underlying character array

◆ data() [2/2]

template<std::size_t _Size = 30>
const_pointer qb::string< _Size >::data ( ) const
inlinenoexcept

Get pointer to underlying data (const version)

Returns
Const pointer to the underlying character array

◆ c_str()

template<std::size_t _Size = 30>
const_pointer qb::string< _Size >::c_str ( ) const
inlinenodiscardnoexcept

Get C-style string representation.

Returns
Null-terminated C-style string

◆ end() [1/2]

template<std::size_t _Size = 30>
iterator qb::string< _Size >::end ( )
inlinenoexcept

Get iterator to the end of the string.

Returns
Iterator pointing just past the last character

◆ end() [2/2]

template<std::size_t _Size = 30>
const_iterator qb::string< _Size >::end ( ) const
inlinenoexcept

Get const iterator to the end of the string.

Returns
Const iterator pointing just past the last character

◆ cend()

template<std::size_t _Size = 30>
const_iterator qb::string< _Size >::cend ( ) const
inlinenoexcept

Get const iterator to the end of the string.

Returns
Const iterator pointing just past the last character

◆ rbegin() [1/2]

template<std::size_t _Size = 30>
reverse_iterator qb::string< _Size >::rbegin ( )
inlinenoexcept

Get reverse iterator to the beginning of the string.

Returns
Reverse iterator pointing to the last character

◆ rbegin() [2/2]

template<std::size_t _Size = 30>
const_reverse_iterator qb::string< _Size >::rbegin ( ) const
inlinenoexcept

Get const reverse iterator to the beginning of the string.

Returns
Const reverse iterator pointing to the last character

◆ crbegin()

template<std::size_t _Size = 30>
const_reverse_iterator qb::string< _Size >::crbegin ( ) const
inlinenoexcept

Get const reverse iterator to the beginning of the string.

Returns
Const reverse iterator pointing to the last character

◆ empty()

template<std::size_t _Size = 30>
bool qb::string< _Size >::empty ( ) const
inlinenodiscardconstexprnoexcept

Check if the string is empty.

Returns
true if the string is empty, false otherwise

◆ size()

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::size ( ) const
inlinenodiscardconstexprnoexcept

Get the string length.

Returns
Number of characters in the string

◆ length()

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::length ( ) const
inlinenodiscardconstexprnoexcept

Get the string length (alias for size())

Returns
Number of characters in the string

◆ max_size()

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::max_size ( ) const
inlinenodiscardconstexprnoexcept

Get the maximum possible size.

Returns
Maximum number of characters the string can hold

◆ capacity()

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::capacity ( ) const
inlinenodiscardconstexprnoexcept

Get the capacity.

Returns
Maximum number of characters the string can hold

◆ clear()

template<std::size_t _Size = 30>
void qb::string< _Size >::clear ( )
inlinenoexcept

Clear the string.

Sets the string to an empty state with a null terminator

◆ resize()

template<std::size_t _Size = 30>
void qb::string< _Size >::resize ( std::size_t count,
char ch = '\0' )
inlinenoexcept

Resize the string.

Parameters
countNew size of the string
chCharacter to fill with if expanding

◆ swap()

template<std::size_t _Size = 30>
void qb::string< _Size >::swap ( string< _Size > & other)
inlinenoexcept

Swap contents with another string.

Parameters
otherString to swap with

◆ substr()

template<std::size_t _Size = 30>
string qb::string< _Size >::substr ( std::size_t pos = 0,
std::size_t len = npos ) const
inline

Extract substring.

Parameters
posStarting position
lenNumber of characters to extract
Returns
New string containing the substring

◆ compare() [1/3]

template<std::size_t _Size = 30>
int qb::string< _Size >::compare ( const string< _Size > & str) const
inlinenoexcept

Compare with another string.

Parameters
strString to compare with
Returns
Negative if this < str, 0 if equal, positive if this > str

◆ compare() [2/3]

template<std::size_t _Size = 30>
int qb::string< _Size >::compare ( const char * str) const
inlinenoexcept

Compare with C-style string.

Parameters
strC-style string to compare with
Returns
Negative if this < str, 0 if equal, positive if this > str

◆ compare() [3/3]

template<std::size_t _Size = 30>
int qb::string< _Size >::compare ( std::size_t pos,
std::size_t len,
const string< _Size > & str ) const
inline

Compare substring with another string.

Parameters
posStarting position in this string
lenNumber of characters to compare
strString to compare with
Returns
Negative if this < str, 0 if equal, positive if this > str

◆ find() [1/3]

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::find ( const string< _Size > & str,
std::size_t pos = 0 ) const
inlinenoexcept

Find substring.

Parameters
strSubstring to find
posStarting position
Returns
Position of first occurrence or npos if not found

◆ find() [2/3]

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::find ( const char * str,
std::size_t pos = 0 ) const
inlinenoexcept

Find C-style string.

Parameters
strC-style string to find
posStarting position
Returns
Position of first occurrence or npos if not found

◆ find() [3/3]

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::find ( char ch,
std::size_t pos = 0 ) const
inlinenoexcept

Find character.

Parameters
chCharacter to find
posStarting position
Returns
Position of first occurrence or npos if not found

◆ rfind() [1/2]

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::rfind ( const char * str,
std::size_t pos = npos ) const
inlinenoexcept

Find last occurrence of substring.

Parameters
strSubstring to find
posStarting position (searches backwards from here)
Returns
Position of last occurrence or npos if not found

◆ rfind() [2/2]

template<std::size_t _Size = 30>
std::size_t qb::string< _Size >::rfind ( char ch,
std::size_t pos = npos ) const
inlinenoexcept

Find last occurrence of character.

Parameters
chCharacter to find
posStarting position (searches backwards from here)
Returns
Position of last occurrence or npos if not found

◆ append() [1/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::append ( const string< _Size > & str)
inlinenoexcept

Append string.

Parameters
strString to append
Returns
Reference to this string

◆ append() [2/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::append ( const char * str)
inlinenoexcept

Append C-style string.

Parameters
strC-style string to append
Returns
Reference to this string

◆ append() [3/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::append ( const char * str,
std::size_t len )
inlinenoexcept

Append C-style string with length.

Parameters
strC-style string to append
lenNumber of characters to append
Returns
Reference to this string

◆ append() [4/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::append ( char ch)
inlinenoexcept

Append character.

Parameters
chCharacter to append
Returns
Reference to this string

◆ append() [5/5]

template<std::size_t _Size = 30>
string & qb::string< _Size >::append ( std::size_t count,
char ch )
inlinenoexcept

Append multiple characters.

Parameters
countNumber of characters to append
chCharacter to append
Returns
Reference to this string

◆ push_back()

template<std::size_t _Size = 30>
void qb::string< _Size >::push_back ( char ch)
inlinenoexcept

Add character to end.

Parameters
chCharacter to add

◆ operator+=() [1/3]

template<std::size_t _Size = 30>
string & qb::string< _Size >::operator+= ( const string< _Size > & str)
inlinenoexcept

Append operator.

Parameters
strString to append
Returns
Reference to this string

◆ operator+=() [2/3]

template<std::size_t _Size = 30>
string & qb::string< _Size >::operator+= ( const char * str)
inlinenoexcept

Append operator for C-style string.

Parameters
strC-style string to append
Returns
Reference to this string

◆ operator+=() [3/3]

template<std::size_t _Size = 30>
string & qb::string< _Size >::operator+= ( char ch)
inlinenoexcept

Append operator for character.

Parameters
chCharacter to append
Returns
Reference to this string

◆ starts_with() [1/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::starts_with ( const char * prefix) const
inlinenoexcept

Check if string starts with given prefix.

Parameters
prefixPrefix to check
Returns
true if string starts with prefix, false otherwise

◆ starts_with() [2/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::starts_with ( const string< _Size > & prefix) const
inlinenoexcept

Check if string starts with given prefix.

Parameters
prefixPrefix to check
Returns
true if string starts with prefix, false otherwise

◆ starts_with() [3/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::starts_with ( char ch) const
inlinenoexcept

Check if string starts with given character.

Parameters
chCharacter to check
Returns
true if string starts with character, false otherwise

◆ ends_with() [1/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::ends_with ( const char * suffix) const
inlinenoexcept

Check if string ends with given suffix.

Parameters
suffixSuffix to check
Returns
true if string ends with suffix, false otherwise

◆ ends_with() [2/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::ends_with ( const string< _Size > & suffix) const
inlinenoexcept

Check if string ends with given suffix.

Parameters
suffixSuffix to check
Returns
true if string ends with suffix, false otherwise

◆ ends_with() [3/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::ends_with ( char ch) const
inlinenoexcept

Check if string ends with given character.

Parameters
chCharacter to check
Returns
true if string ends with character, false otherwise

◆ contains() [1/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::contains ( const char * str) const
inlinenoexcept

Check if string contains given substring.

Parameters
strSubstring to find
Returns
true if string contains substring, false otherwise

◆ contains() [2/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::contains ( const string< _Size > & str) const
inlinenoexcept

Check if string contains given substring.

Parameters
strSubstring to find
Returns
true if string contains substring, false otherwise

◆ contains() [3/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::contains ( char ch) const
inlinenoexcept

Check if string contains given character.

Parameters
chCharacter to find
Returns
true if string contains character, false otherwise

◆ operator==() [1/3]

template<std::size_t _Size = 30>
template<typename T>
bool qb::string< _Size >::operator== ( T const & rhs) const
inlinenoexcept

Equality comparison with string-like object.

Template Parameters
TType with operator== for C-style strings
Parameters
rhsString-like object to compare with
Returns
true if strings are equal, false otherwise

◆ operator==() [2/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator== ( char const * rhs) const
inlinenoexcept

Equality comparison with C-style string.

Parameters
rhsC-style string to compare with
Returns
true if strings are equal, false otherwise

◆ operator==() [3/3]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator== ( const string< _Size > & rhs) const
inlinenoexcept

Equality comparison with another qb::string.

Parameters
rhsString to compare with
Returns
true if strings are equal, false otherwise

◆ operator!=() [1/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator!= ( const string< _Size > & rhs) const
inlinenoexcept

Inequality comparison.

Parameters
rhsString to compare with
Returns
true if strings are not equal, false otherwise

◆ operator!=() [2/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator!= ( const char * rhs) const
inlinenoexcept

Inequality comparison with C-style string.

Parameters
rhsC-style string to compare with
Returns
true if strings are not equal, false otherwise

◆ operator<() [1/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator< ( const string< _Size > & rhs) const
inlinenoexcept

Less than comparison.

Parameters
rhsString to compare with
Returns
true if this string is lexicographically less than rhs

◆ operator<() [2/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator< ( const char * rhs) const
inlinenoexcept

Less than comparison with C-style string.

Parameters
rhsC-style string to compare with
Returns
true if this string is lexicographically less than rhs

◆ operator>() [1/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator> ( const string< _Size > & rhs) const
inlinenoexcept

Greater than comparison.

Parameters
rhsString to compare with
Returns
true if this string is lexicographically greater than rhs

◆ operator>() [2/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator> ( const char * rhs) const
inlinenoexcept

Greater than comparison with C-style string.

Parameters
rhsC-style string to compare with
Returns
true if this string is lexicographically greater than rhs

◆ operator<=() [1/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator<= ( const string< _Size > & rhs) const
inlinenoexcept

Less than or equal comparison.

Parameters
rhsString to compare with
Returns
true if this string is lexicographically less than or equal to rhs

◆ operator<=() [2/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator<= ( const char * rhs) const
inlinenoexcept

Less than or equal comparison with C-style string.

Parameters
rhsC-style string to compare with
Returns
true if this string is lexicographically less than or equal to rhs

◆ operator>=() [1/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator>= ( const string< _Size > & rhs) const
inlinenoexcept

Greater than or equal comparison.

Parameters
rhsString to compare with
Returns
true if this string is lexicographically greater than or equal to rhs

◆ operator>=() [2/2]

template<std::size_t _Size = 30>
bool qb::string< _Size >::operator>= ( const char * rhs) const
inlinenoexcept

Greater than or equal comparison with C-style string.

Parameters
rhsC-style string to compare with
Returns
true if this string is lexicographically greater than or equal to rhs