ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Nested namespaces | Classes | Variables | Functions
aworx::lib::strings Namespace Reference


This is the reference documentation of sub-namespace strings of the ALib C++ Library, which holds types of library module ALib Strings.

Extensive documentation for this module is provided with ALib Module Strings - Programmer's Manual.

Nested namespaces

 APPENDABLES
 
 compatibility
 
 detail
 
 util
 

Classes

struct  T_Append
 
struct  T_SuppressAutoCast
 
class  TAString
 
class  TCString
 
class  TFormat
 
class  TLocalString
 
struct  TLocalStringNoWarning
 
struct  TNumberFormat
 
class  TString
 
class  TStringNZT
 
class  TSubstring
 
struct  TT_IsAppendable
 
struct  TT_StringConstants
 

Variables

constexpr static integer MAX_LEN = (std::numeric_limits<integer>::max)()
 

Functions

template<typename TChar >
lib::strings::TString< TChar > AllocateCopy (const lib::strings::TString< TChar > &src)
 
template<typename TChar >
void DeleteString (const lib::strings::TString< TChar > &string)
 
bool operator!= (const String &lhs, const String &rhs)
 
bool operator<=> (const String &lhs, const String &rhs)
 
bool operator== (const String &lhs, const String &rhs)
 

Function Documentation

◆ AllocateCopy()

lib::strings::TString<TChar> aworx::lib::strings::AllocateCopy ( const lib::strings::TString< TChar > &  src)
inline

Inline namespace function to create a dynamically allocated copy of a string. The string may be deleted using DeleteString.

Strings created with this function might be deleted with DeleteString.

Template Parameters
TCharThe character type of the string. Deduced from the given argument.
Parameters
srcThe source string to copy.
Returns
A string object pointing to the allocated string.

Definition at line 2371 of file string.hpp.

Here is the call graph for this function:

◆ DeleteString()

void aworx::lib::strings::DeleteString ( const lib::strings::TString< TChar > &  string)
inline

Inline namespace function to delete the buffer of a dynamically allocated string. All the method does is: delete[] string.Buffer()

Template Parameters
TCharThe character type of the string. Deduced from the given argument.
Parameters
stringThe string who'se buffer is to be deleted.

Definition at line 2389 of file string.hpp.

◆ operator!=()

bool aworx::lib::strings::operator!= ( const String lhs,
const String rhs 
)

Not-Equal operator for ALib Strings and compatible types. Returns the result of lhs.Equals<Case::Sensitive>(rhs).

Note
This operator is implemented differently than given here in the documentation, namely with variuos overloaded variants using template meta programming and in different versions depending on the selected C++ language standárd.
Parameters
lhsThe left-hand operand of string-like type.
rhsThe right-hand operand of string-like type.
Returns
false if the contents of the strings are equal, true otherwise.

Definition at line 2298 of file string.hpp.

◆ operator<=>()

bool aworx::lib::strings::operator<=> ( const String lhs,
const String rhs 
)

Provision of operators '<', '<=', '>' and '<=' for ALib Strings and compatible types. Invokes of lhs.CompareTo<Case::Sensitive>(rhs) and returns the rightfully interpreted result.

Note
This operator is implemented differently than given here in the documentation, namely with variuos overloaded variants using template meta programming and in different versions depending on the selected C++ language standárd.
Parameters
lhsThe left-hand operand of string-like type.
rhsThe right-hand operand of string-like type.
Returns
false if the contents of the strings are equal, true otherwise.

Definition at line 2314 of file string.hpp.

◆ operator==()

bool aworx::lib::strings::operator== ( const String lhs,
const String rhs 
)

Equal operator for ALib Strings and compatible types. Returns the result of lhs.Equals<Case::Sensitive>(rhs).

Note
This operator is implemented differently than given here in the documentation, namely with variuos overloaded variants using template meta programming and in different versions depending on the selected C++ language standárd.
Parameters
lhsThe left-hand operand of string-like type.
rhsThe right-hand operand of string-like type.
Returns
true if the contents of the strings are equal, false otherwise.

Definition at line 2284 of file string.hpp.

Variable Documentation

◆ MAX_LEN

constexpr static integer MAX_LEN = (std::numeric_limits<integer>::max)()
staticconstexpr

The maximum length of an ALib string.

Definition at line 41 of file string.hpp.