ALib C++ Library
Library Version: 2412 R0
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
 This is a detail namespace of module ALib Strings.
 
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_CStringConstants
 
struct  TT_IsAppendable
 
struct  TT_StringConstants
 DOXYGEN. More...
 

Enumeration Index:

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

Function Index:

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

Variable Index:

static constexpr integer MAX_LEN = (std::numeric_limits<integer>::max)()
 The maximum length of an ALib string.
 

Enumeration Details:

◆ NumberFormatFlags

enum class NumberFormatFlags : uint8_t
strong

Flags used with class TNumberFormat. By default (with construction of an instance of TNumberFormat), all flags are unset, except ForceDecimalPoint.

Enumerator
NONE 

If assigned, all flags are unset.

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.

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 flag ist set, then trailing '0' digits in the fractional part of a floating point value are not written, even if a TNumberFormat::FractionalPartWidth is set.

ReplaceLeadingZerosWithSpaces 

If this flag ist set, then leading '0' digits and group characters are replaced with spaces. This applies to integral values and to the integral part of floating point values, in the case that TNumberFormat::DecMinimumFieldWidth, respectively TNumberFormat::IntegralPartMinimumWidth, specifies the output to be wider than the number printed.

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 22 of file numberformat.hpp.

Function Details:

◆ operator==()

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

Comparison operators for ALib Strings and compatible types. Those are:

  • operator==,
  • operator!=,
  • operator<,
  • operator<=,
  • operator>, and
  • operator>=.

The operators use methods lhs.Equals<CHK, lang::Case::Sensitive>(rhs), and lhs.CompareTo<CHK, lang::Case::Sensitive>(rhs) for evaluation.

For performance-critical sections, the original methods may be used where template parameter TCheck can be set to NC.

Note
For avoiding redundancy, only operator== is listed here in the documentation!
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 2405 of file string.hpp.

Variable Details:

◆ MAX_LEN

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

The maximum length of an ALib string.

Definition at line 31 of file string.hpp.