xentara-utils v1.2.1
Xentara utilities library
Loading...
Searching...
No Matches
xentara::utils::string Namespace Reference

String utilities. More...

Namespaces

namespace  deprecated
 
namespace  unicode
 

Classes

class  BasicFixedString
 A string with a fixed size. More...
 
class  BasicStaticString
 A string that uses a statically allocated buffer for the data. More...
 
class  Converter
 A convert that allows conversion from one string type to another. More...
 
struct  IsNoopConversion
 Determines if a conversion between two string types is a NOOP. More...
 
struct  UninitializedTag
 Type used to select the constructor of BasicFixedString that leaves characters uninitialized. More...
 
class  view
 This is a wrapper class that supplies missing operator + () for string views. More...
 

Concepts

concept  CharacterType
 A concept for character data.
 

Typedefs

template<std::size_t kSize>
using FixedString = BasicFixedString< char, kSize >
 A statically allocated string containing elements of type char
 
template<std::size_t kSize>
using FixedWString = BasicFixedString< wchar_t, kSize >
 A statically allocated string containing elements of type wchar_t
 
template<std::size_t kSize>
using FixedU8String = BasicFixedString< char8_t, kSize >
 A statically allocated string containing elements of type char8_t
 
template<std::size_t kSize>
using FixedU16String = BasicFixedString< char16_t, kSize >
 A statically allocated string containing elements of type char16_t
 
template<std::size_t kSize>
using FixedU32String = BasicFixedString< char32_t, kSize >
 A statically allocated string containing elements of type char32_t
 
template<std::size_t kCapacity>
using StaticString = BasicStaticString< char, kCapacity >
 A statically allocated string containing elements of type char
 
template<std::size_t kCapacity>
using StaticWString = BasicStaticString< wchar_t, kCapacity >
 A statically allocated string containing elements of type wchar_t
 
template<std::size_t kCapacity>
using StaticU8String = BasicStaticString< char8_t, kCapacity >
 A statically allocated string containing elements of type char8_t
 
template<std::size_t kCapacity>
using StaticU16String = BasicStaticString< char16_t, kCapacity >
 A statically allocated string containing elements of type char16_t
 
template<std::size_t kCapacity>
using StaticU32String = BasicStaticString< char32_t, kCapacity >
 A statically allocated string containing elements of type char32_t
 

Functions

template<typename... Fragments>
auto cat (const Fragments &... fragments) -> std::string
 Concatenates a number of fragments to a string in local encoding.
 
template<tools::StringViewable String, tools::CharType OutputCharT>
 Converter (String &&, std::in_place_type_t< OutputCharT >) -> Converter< OutputCharT, typename tools::StringViewableViewType< String >::const_iterator, typename tools::StringViewableViewType< String >::const_iterator >
 
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel, tools::CharType OutputCharT>
 Converter (InputIterator, InputSentinel, std::in_place_type_t< OutputCharT >) -> Converter< OutputCharT, InputIterator, InputSentinel >
 
template<tools::CharType OutputChar, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel, std::output_iterator< OutputChar > OutputIterator, std::sentinel_for< OutputIterator > OutputSentinel = std::unreachable_sentinel_t>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto convert (InputIterator begin, InputSentinel end, OutputIterator output, OutputSentinel outputEnd=std::unreachable_sentinel) -> OutputIterator
 Converts a character sequence from one type to another.
 
template<tools::CharType OutputChar, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto convert (InputIterator begin, InputSentinel end) -> std::basic_string< OutputChar >
 Converts a character sequence from one type to another.
 
template<tools::CharType OutputChar, typename CharTraits , std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto convert (InputIterator begin, InputSentinel end) -> std::basic_string< OutputChar, CharTraits >
 Converts a character sequence from one type to another.
 
template<tools::CharType OutputChar, typename CharTraits , tools::Allocator< OutputChar > Allocator, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto convert (InputIterator begin, InputSentinel end, const Allocator &allocator=Allocator()) -> std::basic_string< OutputChar, CharTraits, Allocator >
 Converts a character sequence from one type to another.
 
template<tools::CharType OutputChar, tools::StringViewable String>
auto convert (String &&string) -> std::basic_string< OutputChar >
 Converts a string from one type to another.
 
template<tools::CharType OutputChar, typename CharTraits , tools::StringViewable String>
auto convert (String &&string) -> std::basic_string< OutputChar, CharTraits >
 Converts a string from one type to another.
 
template<tools::CharType OutputChar, typename CharTraits , tools::Allocator< OutputChar > Allocator, tools::StringViewable String>
auto convert (String &&string, const Allocator &allocator=Allocator()) -> std::basic_string< OutputChar, CharTraits, Allocator >
 Converts a string from one type to another.
 
template<tools::CharType OutputChar, tools::StringViewable String>
auto convertOrView (const String &string) -> std::conditional_t< kIsNoopConversion< tools::StringViewableCharType< String >, OutputChar >, std::basic_string_view< OutputChar >, std::basic_string< OutputChar > >
 Converts a string from one type to another, returning a view if no conversion is necessary.
 
template<tools::CharType OutputChar, typename CharTraits , tools::StringViewable String>
auto convertOrView (const String &string) -> std::conditional_t< kIsNoopConversion< tools::StringViewableCharType< String >, OutputChar >, std::basic_string_view< OutputChar, CharTraits >, std::basic_string< OutputChar, CharTraits > >
 Converts a string from one type to another, returning a view if no conversion is necessary.
 
template<tools::CharType OutputChar, typename CharTraits , tools::Allocator< OutputChar > Allocator, tools::StringViewable String>
auto convertOrView (const String &string, const Allocator &allocator=Allocator()) -> std::conditional_t< kIsNoopConversion< tools::StringViewableCharType< String >, OutputChar >, std::basic_string_view< OutputChar, CharTraits >, std::basic_string< OutputChar, CharTraits, Allocator > >
 Converts a string from one type to another, returning a view if no conversion is necessary.
 
template<tools::CharType OutputChar, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto convertedSize (InputIterator begin, InputSentinel end) -> std::size_t
 Gets the size of a converted character sequence.
 
template<tools::CharType OutputChar, tools::StringViewable String>
auto convertedSize (const String &string) -> std::size_t
 Gets the size of a converted string of type char
 
template<typename Char , typename Traits >
constexpr auto fromStringView (const std::basic_string_view< Char, Traits > &view) -> std::basic_string< Char, Traits >
 Creates a string from a string view.
 
template<CharacterType Character>
constexpr auto strlen (const Character *string) -> std::size_t
 Calculate the length of a string.
 
constexpr auto strlen (std::nullptr_t) -> std::size_t
 Overload for xentara::utils::core::strlen() for literal null pointers.
 

Variables

constexpr UninitializedTag kUninitialized
 A marker used to select constructor of BasicFixedString that leaves characters uninitialized.
 

Detailed Description

String utilities.

This namespace contains string utilities.

Typedef Documentation

◆ FixedString

template<std::size_t kSize>
using xentara::utils::string::FixedString = typedef BasicFixedString<char, kSize>

A statically allocated string containing elements of type char

Template Parameters
kSizeThe capacity of the string

◆ FixedU16String

template<std::size_t kSize>
using xentara::utils::string::FixedU16String = typedef BasicFixedString<char16_t, kSize>

A statically allocated string containing elements of type char16_t

Template Parameters
kSizeThe capacity of the string

◆ FixedU32String

template<std::size_t kSize>
using xentara::utils::string::FixedU32String = typedef BasicFixedString<char32_t, kSize>

A statically allocated string containing elements of type char32_t

Template Parameters
kSizeThe capacity of the string

◆ FixedU8String

template<std::size_t kSize>
using xentara::utils::string::FixedU8String = typedef BasicFixedString<char8_t, kSize>

A statically allocated string containing elements of type char8_t

Template Parameters
kSizeThe capacity of the string

◆ FixedWString

template<std::size_t kSize>
using xentara::utils::string::FixedWString = typedef BasicFixedString<wchar_t, kSize>

A statically allocated string containing elements of type wchar_t

Template Parameters
kSizeThe capacity of the string

◆ StaticString

template<std::size_t kCapacity>
using xentara::utils::string::StaticString = typedef BasicStaticString<char, kCapacity>

A statically allocated string containing elements of type char

Template Parameters
kCapacityThe capacity of the string

◆ StaticU16String

template<std::size_t kCapacity>
using xentara::utils::string::StaticU16String = typedef BasicStaticString<char16_t, kCapacity>

A statically allocated string containing elements of type char16_t

Template Parameters
kCapacityThe capacity of the string

◆ StaticU32String

template<std::size_t kCapacity>
using xentara::utils::string::StaticU32String = typedef BasicStaticString<char32_t, kCapacity>

A statically allocated string containing elements of type char32_t

Template Parameters
kCapacityThe capacity of the string

◆ StaticU8String

template<std::size_t kCapacity>
using xentara::utils::string::StaticU8String = typedef BasicStaticString<char8_t, kCapacity>

A statically allocated string containing elements of type char8_t

Template Parameters
kCapacityThe capacity of the string

◆ StaticWString

template<std::size_t kCapacity>
using xentara::utils::string::StaticWString = typedef BasicStaticString<wchar_t, kCapacity>

A statically allocated string containing elements of type wchar_t

Template Parameters
kCapacityThe capacity of the string

Function Documentation

◆ cat()

template<typename... Fragments>
auto xentara::utils::string::cat ( const Fragments &...  fragments) -> std::string

Concatenates a number of fragments to a string in local encoding.

The fragments can be anything convertible to std::string_view, std::wstring_view, std::u8string_view, std::u16string_view, or std::u32string_view, as well as any number, character, or boolean value. Also supported are std::chrono::system_clock::time_point, and std::filesystem::path.

Please note that the type char will be interpreted as a character, not a number.

Note
Under Windows, types convertible to std::wstring_view are supported as well, to enable passing WCHAR-based strings to xentara::utils::string::cat().
Support for User Defined Types
cat uses customization points to allow adding support for concatenating user defined types. The customization points are either namespace scope functions or function objects findable by ADL lookup, or member functions of the custom type.

There are two was to support concatenation using cat.

1. Using xentara_cat_string

In order to use this approach, you must provide one of the following:

  • a function or function object named xentara_cat_string, that is const-callable as xentara_cat_string(const UserDefinedType &fragment), or
  • a member function named xentara_cat_string, that can be called as fragment.xentara_cat_string() on a const object.

The function must return any other value that is supported by cat.

2. Using xentara_cat_size and xentara_cat_append

In order to use this approach, you must provide one of the following:

  • a function or function object named xentara_cat_append, that is const-callable as xentara_cat_append(std::string &string, const UserDefinedType &fragment), or
  • a member function named xentara_cat_append, that can be called as fragment.xentara_cat_append(std::string &string) on a const object.

The function must append a text representation of the given object to the given string.

To enable cat to pre-allocate the storage, you must also provide one of the following:

  • a function or function object named xentara_cat_size, that is const-callable as xentara_cat_size(const UserDefinedType &fragment),
  • a member function named xentara_cat_size, that can be called as fragment.xentara_cat_append() on a const object, or
  • a member function named size, that can be called as fragment.xentara_cat_append() on a const object.

The function must return the number of characters that will be appended when calling xentara_cat_append.

Parameters
fragmentsThe fragments
Returns
The convatenated string

◆ convert() [1/7]

template<tools::CharType OutputChar, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto xentara::utils::string::convert ( InputIterator  begin,
InputSentinel  end 
) -> std::basic_string<OutputChar>

Converts a character sequence from one type to another.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

Note
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Template Parameters
OutputCharThe character type to use for the returned string
Parameters
beginThe beginning of the input sequence
endThe end of the input sequence
Returns
Returns the output sequence as a string

◆ convert() [2/7]

template<tools::CharType OutputChar, typename CharTraits , std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto xentara::utils::string::convert ( InputIterator  begin,
InputSentinel  end 
) -> std::basic_string<OutputChar, CharTraits>

Converts a character sequence from one type to another.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

Note
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Template Parameters
OutputCharThe character type to use for the returned string
CharTraitsThe character traits to be used for the returned string
Parameters
beginThe beginning of the input sequence
endThe end of the input sequence
Returns
Returns the output sequence as a string

◆ convert() [3/7]

template<tools::CharType OutputChar, typename CharTraits , tools::Allocator< OutputChar > Allocator, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto xentara::utils::string::convert ( InputIterator  begin,
InputSentinel  end,
const Allocator &  allocator = Allocator() 
) -> std::basic_string<OutputChar, CharTraits, Allocator>

Converts a character sequence from one type to another.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

Note
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Template Parameters
OutputCharThe character type to use for the returned string
CharTraitsThe character traits to be used for the returned string
AllocatorThe allocator type to be used for the returned string
Parameters
beginThe beginning of the input sequence
endThe end of the input sequence
allocatorThe allocator to be used for the returned string
Returns
Returns the output sequence as a string

◆ convert() [4/7]

template<tools::CharType OutputChar, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel, std::output_iterator< OutputChar > OutputIterator, std::sentinel_for< OutputIterator > OutputSentinel = std::unreachable_sentinel_t>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto xentara::utils::string::convert ( InputIterator  begin,
InputSentinel  end,
OutputIterator  output,
OutputSentinel  outputEnd = std::unreachable_sentinel 
) -> OutputIterator

Converts a character sequence from one type to another.

This function converts a string from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

If the converted string does not fit into the output sequence, then it is silently truncated. If you need to know whether the sequence was truncated or not, you must use a Converter object instead of this function.

Note
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Parameters
beginThe beginning of the input sequence
endThe end of the input sequence
outputAn output iterator for the output sequence
outputEndA sentinel to mark the end of the output sequence
Returns
Returns an iterator to the position beyond the last character written to the output sequence

◆ convert() [5/7]

template<tools::CharType OutputChar, tools::StringViewable String>
auto xentara::utils::string::convert ( String &&  string) -> std::basic_string<OutputChar>

Converts a string from one type to another.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

Note
If you pass a std::basic_string<OutputChar> && "std::basic_string" to this function, if will simply move the input string to the output string. This allows you to efficientls use this function in templates, where the input and output types may be the same.
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Template Parameters
OutputCharThe character type to use for the returned string
Parameters
stringThe string to convert
Returns
Returns the output sequence as a string

◆ convert() [6/7]

template<tools::CharType OutputChar, typename CharTraits , tools::StringViewable String>
auto xentara::utils::string::convert ( String &&  string) -> std::basic_string<OutputChar, CharTraits>

Converts a string from one type to another.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

Note
If you pass a std::basic_string<OutputChar> && "std::basic_string" to this function, if will simply move the input string to the output string. This allows you to efficientls use this function in templates, where the input and output types may be the same.
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Template Parameters
OutputCharThe character type to use for the returned string
CharTraitsThe character traits to be used for the returned string
Parameters
stringThe string to convert
Returns
Returns the output sequence as a string

◆ convert() [7/7]

template<tools::CharType OutputChar, typename CharTraits , tools::Allocator< OutputChar > Allocator, tools::StringViewable String>
auto xentara::utils::string::convert ( String &&  string,
const Allocator &  allocator = Allocator() 
) -> std::basic_string<OutputChar, CharTraits, Allocator>

Converts a string from one type to another.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

Note
If you pass a std::basic_string<OutputChar> && "std::basic_string" to this function, if will simply move the input string to the output string. This allows you to efficientls use this function in templates, where the input and output types may be the same.
If the input and output types have the same encoding, the data is copied as-is, without checking the validity. This means you cannot use this function to correct corrupt Unicode data.
Template Parameters
OutputCharThe character type to use for the returned string
CharTraitsThe character traits to be used for the returned string
AllocatorThe allocator type to be used for the returned string
Parameters
stringThe string to convert
allocatorThe allocator to be used for the returned string
Returns
Returns the output sequence as a string

◆ convertedSize() [1/2]

template<tools::CharType OutputChar, tools::StringViewable String>
auto xentara::utils::string::convertedSize ( const String &  string) -> std::size_t

Gets the size of a converted string of type char

This function determines how much space will be needed to convert a string using convert().

Parameters
stringThe string to convert
Returns
Returns the number of code units the conversion will generate

◆ convertedSize() [2/2]

template<tools::CharType OutputChar, std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel>
requires tools::CharType<std::iter_value_t<InputIterator>>
auto xentara::utils::string::convertedSize ( InputIterator  begin,
InputSentinel  end 
) -> std::size_t

Gets the size of a converted character sequence.

This function determines how much space will be needed to convert a character sequence using convert().

Parameters
beginThe beginning of the input sequence
endThe end of the input sequence
Returns
Returns the number of code units the conversion will generate

◆ Converter() [1/2]

template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > InputSentinel, tools::CharType OutputCharT>
xentara::utils::string::Converter ( InputIterator  ,
InputSentinel  ,
std::in_place_type_t< OutputCharT >   
) -> Converter< OutputCharT, InputIterator, InputSentinel >

◆ Converter() [2/2]

template<tools::StringViewable String, tools::CharType OutputCharT>
xentara::utils::string::Converter ( String &&  ,
std::in_place_type_t< OutputCharT >   
) -> Converter< OutputCharT, typename tools::StringViewableViewType< String >::const_iterator, typename tools::StringViewableViewType< String >::const_iterator >

◆ convertOrView() [1/3]

template<tools::CharType OutputChar, tools::StringViewable String>
auto xentara::utils::string::convertOrView ( const String &  string) -> std::conditional_t< kIsNoopConversion<tools::StringViewableCharType<String>, OutputChar>, std::basic_string_view<OutputChar>, std::basic_string<OutputChar>>

Converts a string from one type to another, returning a view if no conversion is necessary.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

In contrast to convert(), this function will only return a string, if a conversion needs to be done. If the encoding of the input type and the output type are the same, an std::basic_string_view referencing the data of the input string will be returned instead. This allows you to efficiently use this function in templates, where you want to avoid copying the data if possible.

Template Parameters
OutputCharThe character type to use for the returned string
Parameters
stringThe string to convert
Returns
Returns the output sequence as a string, or a view of the data of the input sequence if the encodings are the same.

◆ convertOrView() [2/3]

template<tools::CharType OutputChar, typename CharTraits , tools::StringViewable String>
auto xentara::utils::string::convertOrView ( const String &  string) -> std::conditional_t< kIsNoopConversion<tools::StringViewableCharType<String>, OutputChar>, std::basic_string_view<OutputChar, CharTraits>, std::basic_string<OutputChar, CharTraits>>

Converts a string from one type to another, returning a view if no conversion is necessary.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

In contrast to convert(), this function will only return a string, if a conversion needs to be done. If the encoding of the input type and the output type are the same, an std::basic_string_view referencing the data of the input string will be returned instead. This allows you to efficiently use this function in templates, where you want to avoid copying the data if possible.

Template Parameters
OutputCharThe character type to use for the returned string
CharTraitsThe character traits to be used for the returned string
Parameters
stringThe string to convert
Returns
Returns the output sequence as a string, or a view of the data of the input sequence if the encodings are the same.

◆ convertOrView() [3/3]

template<tools::CharType OutputChar, typename CharTraits , tools::Allocator< OutputChar > Allocator, tools::StringViewable String>
auto xentara::utils::string::convertOrView ( const String &  string,
const Allocator &  allocator = Allocator() 
) -> std::conditional_t< kIsNoopConversion<tools::StringViewableCharType<String>, OutputChar>, std::basic_string_view<OutputChar, CharTraits>, std::basic_string<OutputChar, CharTraits, Allocator>>

Converts a string from one type to another, returning a view if no conversion is necessary.

This function converts a character sequence from one Unicode encoding to another. Illegal code points (high and low surrogates, and code points higher than U+10FFFF) and non-decodable input values are replaced by the replacement character.

In contrast to convert(), this function will only return a string, if a conversion needs to be done. If the encoding of the input type and the output type are the same, an std::basic_string_view referencing the data of the input string will be returned instead. This allows you to efficiently use this function in templates, where you want to avoid copying the data if possible.

Template Parameters
OutputCharThe character type to use for the returned string
CharTraitsThe character traits to be used for the returned string
AllocatorThe allocator type to be used for the returned string
Parameters
stringThe string to convert
allocatorThe allocator to be used for the returned string
Returns
Returns the output sequence as a string, or a view of the data of the input sequence if the encodings are the same.

◆ fromStringView()

template<typename Char , typename Traits >
constexpr auto xentara::utils::string::fromStringView ( const std::basic_string_view< Char, Traits > &  view) -> std::basic_string<Char, Traits>
constexpr

Creates a string from a string view.

◆ strlen() [1/2]

template<CharacterType Character>
constexpr auto xentara::utils::string::strlen ( const Character *  string) -> std::size_t
constexpr

Calculate the length of a string.

Calculates the number of characters in a string. The behaviour is undefined if string is not nullptr or a null terminated character array.

This function has a number of differences compared to std::strlen:

  • The function is constexpr
  • The function can take a string of any character type
  • The function will interpret nullptr as a zero-length string
    Note
    Like std::strlen, this function does not count code points, but code units. In an UTF-8 string, for example, this function will simply count the number of bytes in the string, without accounting for multi byte characters.
    Parameters
    stringThe string. Must be either a null terminated string, or nullptr.
    Returns
    The number of code units contained in the string

◆ strlen() [2/2]

constexpr auto xentara::utils::string::strlen ( std::nullptr_t  ) -> std::size_t
constexpr

Overload for xentara::utils::core::strlen() for literal null pointers.

Returns
Always returns 0

Variable Documentation

◆ kUninitialized

constexpr UninitializedTag xentara::utils::string::kUninitialized
constexpr

A marker used to select constructor of BasicFixedString that leaves characters uninitialized.

See also
BasicFixedString