ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::strings Namespace Reference

Description:


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:

namespace  APPENDABLES
 
namespace  compatibility
 
namespace  detail
 
namespace  util
 

Type Index:

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

Enumeration Index:

enum class  NumberFormatFlags : uint8_t {
  NONE = 0 , ReadGroupChars = 1 , WriteGroupChars = 2 , ForceDecimalPoint = 4 ,
  WriteExponentPlusSign = 8 , OmitTrailingFractionalZeros =16 , ForceScientific =32 , HexLowerCase =64
}
 

Function Index:

Comparison Operators

############################################################################################

#############################################################################################

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

Variable Index:

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

Enumeration Details:

◆ NumberFormatFlags

enum class NumberFormatFlags : uint8_t
strong

Flags used with class TNumberFormat .

Enumerator
NONE 

Used to clear all flags

ReadGroupChars 

Denotes if grouping characters are ignored when parsing numbers if they are given (not set to '\0'). This applies to all number types.
Defaults to false. If set to true, grouping characters are just skipped when found while parsing numbers, no matter at which position they occur.

WriteGroupChars 

Denotes if grouping characters are written if they are given (not set to '\0'). This applies to all number types.
Defaults to false.

ForceDecimalPoint 

If true, the decimal point of floating point values is written, even if the fractional part of the float value is zero. If false, in this case the decimal point is omitted.
Defaults to true.

WriteExponentPlusSign 

Determines if positive exponent values are prepended with an explicit '+' character when written using WriteFloat .
Defaults to false, as some systems will not accept a plus sign on the exponent value. Note that field TNumberFormat::PlusSign is not applicable for exponent numbers.

OmitTrailingFractionalZeros 

If this field is true, then trailing '0' digits in the fractional part of a floating point value are not written, even if a TNumberFormat::FractionalPartWidth is set. Defaults to false.

ForceScientific 

If true, scientific format is always used.
If false (the default), function WriteFloat writes scientific format only if both fields, TNumberFormat::IntegralPartMinimumWidth and TNumberFormat::FractionalPartWidth are evaluating to -1 and only for numbers smaller than 10E-04 or larger than 10E+06.

If one of the fields TNumberFormat::IntegralPartMinimumWidth or TNumberFormat::FractionalPartWidth is set to a positive value, these limits get extended. Function WriteFloat in this case keeps non-scientific notation established if possible.

HexLowerCase 

If true, lower case letters 'a' - 'f' are written. Defaults to false, which writes upper case letters 'A' - 'F'.

Definition at line 24 of file numberformat.hpp.

Function Details:

◆ AllocateCopy()

template<typename TChar >
strings::TString< TChar > AllocateCopy ( const 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 2406 of file string.hpp.

Here is the call graph for this function:

◆ DeleteString()

template<typename TChar >
void DeleteString ( const 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 whose buffer is to be deleted.

Definition at line 2424 of file string.hpp.

◆ operator!=()

bool operator!= ( const String & lhs,
const String & rhs )

Not-Equal operator for ALib Strings and compatible types. Returns the result of lhs.Equals<lang::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 2333 of file string.hpp.

◆ operator<=>()

bool operator<=> ( const String & lhs,
const String & rhs )

Provision of operators '<', '<=', '>' and '<=' for ALib Strings and compatible types. Invokes of lhs.CompareTo<lang::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 2349 of file string.hpp.

◆ operator==()

bool operator== ( const String & lhs,
const String & rhs )

Equal operator for ALib Strings and compatible types. Returns the result of lhs.Equals<lang::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 2319 of file string.hpp.

Variable Details:

◆ MAX_LEN

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

The maximum length of an ALib string.

Definition at line 45 of file string.hpp.