ALib C++ Library
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::strings::TLocalStringNoWarning< TChar, TCapacity, TAllocator > Struct Template Reference

Description:

template<typename TChar, integer TCapacity, typename TAllocator>
struct alib::strings::TLocalStringNoWarning< TChar, TCapacity, TAllocator >

This simple specialization of TLocalString disables the warning about replacements of the internal buffer in debug-compilations. This may be used in situations, where it is not possible to disable this warning after construction, for example, if a local string is emplaced in a container and extensions of it's local capacity are well accepted (for a minority of the emplaced strings).

In release compilations, this type does not exist, but is replaced by a simple using statement.

Template Parameters
TCharThe character type.
TCapacityThe capacity of local, embedded string buffer.
TAllocatorThe allocator to use.

Definition at line 269 of file localstring.inl.

Inheritance diagram for alib::strings::TLocalStringNoWarning< TChar, TCapacity, TAllocator >:
[legend]
Collaboration diagram for alib::strings::TLocalStringNoWarning< TChar, TCapacity, TAllocator >:
[legend]

Public Method Index:

constexpr TLocalStringNoWarning ()
 Default constructor.
 
 TLocalStringNoWarning (const String &src)
 
- Public Method Index: inherited from alib::strings::TLocalString< TChar, TCapacity, TAllocator >
constexpr TLocalString ()
 
 TLocalString (const TAppendable &src)
 
 TLocalString (const TLocalString &copy)
 
constexpr TLocalString (TAllocator &pAllocator)
 
 TLocalString (TLocalString &&move) noexcept
 
TLocalStringoperator= (const TAppendable &src)
 
TLocalStringoperator= (const TLocalString &copy)
 
TLocalStringoperator= (TLocalString &&move)
 
- Public Method Index: inherited from alib::strings::TAString< TChar, TAllocator >
constexpr TAString ()
 Constructs an empty, nulled AString (does not allocate a buffer).
 
constexpr TAString ()
 Constructs an empty, nulled AString (does not allocate a buffer).
 
 TAString (const TAppendable &src)
 
 TAString (const TAppendable &src)
 
 TAString (const TAString &copy)
 
 TAString (const TAString &copy)
 
constexpr TAString (TAllocator &pAllocator)
 
constexpr TAString (TAllocator &pAllocator)
 
 TAString (TAString &&move) noexcept
 
 TAString (TAString &&move) noexcept
 
 ~TAString () noexcept
 Destructs an AString object. An internally allocated buffer will be deleted.
 
 ~TAString () noexcept
 Destructs an AString object. An internally allocated buffer will be deleted.
 
const_iterator begin () const
 
const_iterator end () const
 
constexpr operator T () const
 
constexpr operator T () const
 
constexpr operator T () const
 
constexpr operator T () const
 
constexpr operator T () const
 
constexpr operator T () const
 
constexpr operator T () const
 
constexpr operator T () const
 
TAStringoperator= (const TAString &copy)
 
TAStringoperator= (const TAString &copy)
 
TChar operator[] (integer idx) const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
void dbgCheck () const
 
void DbgDisableBufferReplacementWarning ()
 
void dbgCheck () const
 
void DbgDisableBufferReplacementWarning ()
 
ALIB_DLL void SetBuffer (integer newCapacity)
 
ALIB_DLL void SetBuffer (TChar *extBuffer, integer extBufferSize, integer extLength=0, lang::Responsibility responsibility=lang::Responsibility::KeepWithSender)
 
void EnsureRemainingCapacity (integer spaceNeeded)
 
ALIB_DLL void GrowBufferAtLeastBy (integer minimumGrowth)
 
integer Capacity () const
 
bool HasInternalBuffer () const
 
void SetNull ()
 Invokes SetBuffer(0).
 
constexpr const TChar * Terminate () const
 
ALIB_DLL void SetBuffer (integer newCapacity)
 
ALIB_DLL void SetBuffer (TChar *extBuffer, integer extBufferSize, integer extLength=0, lang::Responsibility responsibility=lang::Responsibility::KeepWithSender)
 
void EnsureRemainingCapacity (integer spaceNeeded)
 
ALIB_DLL void GrowBufferAtLeastBy (integer minimumGrowth)
 
integer Capacity () const
 
bool HasInternalBuffer () const
 
void SetNull ()
 Invokes SetBuffer(0).
 
constexpr const TChar * Terminate () const
 
TChar * VBuffer () const
 
void SetCharAt (integer idx, TChar c)
 
TChar & operator[] (integer idx)
 
void SetLength (integer newLength)
 
integer DetectLength (integer offset=0)
 
TAStringShortenTo (integer newLength)
 
TAStringShortenBy (integer charsToRemove)
 
TChar * VBuffer () const
 
void SetCharAt (integer idx, TChar c)
 
TChar & operator[] (integer idx)
 
TChar operator[] (integer idx) const
 
void SetLength (integer newLength)
 
integer DetectLength (integer offset=0)
 
TAStringShortenTo (integer newLength)
 
TAStringShortenBy (integer charsToRemove)
 
TAStringAppend (const TCharSrc *src, integer srcLength)
 
TAStringAppend (const TChar *src, integer srcLength)
 
TAStringAppend (const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
 
TAStringAppend (const TAppendable &src)
 
TAStringAppend (const TStringSource &src)
 
TAStringNewLine ()
 
TAStringAppend (TChar src)
 
TAStringAppend (characters::IsCharacter auto src)
 
TAString_ (const TAppendable &src)
 
TAString_ (const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
 
TAStringoperator<< (const TAppendable &src)
 
TAStringoperator+= (const TAppendable &src)
 
TAStringAppend (const TCharSrc *src, integer srcLength)
 
TAStringAppend (const TChar *src, integer srcLength)
 
TAStringAppend (const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
 
TAStringAppend (const TAppendable &src)
 
TAStringAppend (const TStringSource &src)
 
TAStringAppend (TChar src)
 
TAStringAppend (characters::IsCharacter auto src)
 
TAStringNewLine ()
 
TAString_ (const TAppendable &src)
 
TAString_ (const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
 
TAStringoperator<< (const TAppendable &src)
 
TAStringoperator+= (const TAppendable &src)
 
TAStringReset ()
 
TAStringReset (const TAppendable &src)
 
TAString_ ()
 
TAStringInsertAt (const TString< TChar > &src, integer pos)
 
TAStringInsertChars (TChar c, integer qty)
 
TAStringInsertChars (TChar c, integer qty, integer pos)
 
TAStringDelete (integer regionStart, integer regionLength=MAX_LEN)
 
TAStringDeleteStart (integer regionLength)
 
TAStringDeleteStart (const TString< TChar > &deleteIfMatch)
 
TAStringDeleteEnd (integer regionLength)
 
TAStringDeleteEnd (const TString< TChar > &deleteIfMatch)
 
ALIB_DLL TAStringTrim (const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
ALIB_DLL integer TrimAt (integer idx, const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
TAStringTrimStart (const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
TAStringTrimEnd (const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
TAString_ ()
 
TAStringReset ()
 
TAStringReset (const TAppendable &src)
 
TAStringInsertAt (const TString< TChar > &src, integer pos)
 
TAStringInsertChars (TChar c, integer qty)
 
TAStringInsertChars (TChar c, integer qty, integer pos)
 
TAStringDelete (integer regionStart, integer regionLength=MAX_LEN)
 
TAStringDeleteStart (integer regionLength)
 
TAStringDeleteStart (const TString< TChar > &deleteIfMatch)
 
TAStringDeleteEnd (integer regionLength)
 
TAStringDeleteEnd (const TString< TChar > &deleteIfMatch)
 
ALIB_DLL TAStringTrim (const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
ALIB_DLL integer TrimAt (integer idx, const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
TAStringTrimStart (const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
TAStringTrimEnd (const TCString< TChar > &trimChars=CStringConstantsTraits< TChar >::DefaultWhitespaces())
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
constexpr void push_back (TChar ch)
 
constexpr TChar pop_back ()
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
constexpr void push_back (TChar ch)
 
constexpr TChar pop_back ()
 
TAStringReplaceSubstring (const TString< TChar > &src, integer regionStart, integer regionLength)
 
TAStringReplaceRegion (TChar c, integer regionStart, integer regionLength)
 
ALIB_DLL integer SearchAndReplace (TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN)
 
ALIB_DLL integer SearchAndReplace (const TString< TChar > &needle, const TString< TChar > &replacement, integer startIdx=0, integer maxReplacements=strings::MAX_LEN, lang::Case sensitivity=lang::Case::Sensitive, integer endIdx=strings::MAX_LEN)
 
TAStringToUpper (integer regionStart=0, integer regionLength=MAX_LEN)
 
TAStringToLower (integer regionStart=0, integer regionLength=MAX_LEN)
 
TAStringReverse (integer regionStart=0, integer regionLength=MAX_LEN)
 
TAStringReplaceSubstring (const TString< TChar > &src, integer regionStart, integer regionLength)
 
TAStringReplaceRegion (TChar c, integer regionStart, integer regionLength)
 
ALIB_DLL integer SearchAndReplace (TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN)
 
ALIB_DLL integer SearchAndReplace (const TString< TChar > &needle, const TString< TChar > &replacement, integer startIdx=0, integer maxReplacements=strings::MAX_LEN, lang::Case sensitivity=lang::Case::Sensitive, integer endIdx=strings::MAX_LEN)
 
TAStringToUpper (integer regionStart=0, integer regionLength=MAX_LEN)
 
TAStringToLower (integer regionStart=0, integer regionLength=MAX_LEN)
 
TAStringReverse (integer regionStart=0, integer regionLength=MAX_LEN)
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
- Public Method Index: inherited from alib::strings::TString< TChar >
constexpr TString () noexcept=default
 
template<typename T>
requires alib::characters::IsImplicitArraySource<T, TChar>
constexpr TString (const T &src) noexcept
 
template<typename T>
requires alib::characters::IsExplicitArraySource<T, TChar>
constexpr TString (const T &src) noexcept
 
constexpr TString (const TChar *pBuffer, integer pLength) noexcept
 
constexpr TString (const TString &) noexcept=default
 Defaulted copy constructor.
 
 TString (const_iterator &start, const_iterator &end)
 
constexpr TString (lang::IsNullptr auto const &) noexcept
 Constructor accepting nullptr. Constructs a nulled string.
 
template<typename T>
requires alib::characters::IsMutableArraySource<T, TChar>
constexpr TString (T &src) noexcept
 
template<typename TAllocator>
requires alib::lang::IsAllocator<TAllocator>
 TString (TAllocator &allocator, const TString< TChar > &copy)
 
constexpr TString (TString &&) noexcept=default
 Defaulted move constructor.
 
template<typename T>
requires ( alib::characters::IsImplicitArrayCast<T, TChar> && !alib::strings::NoAutoCastTraits< TString<TChar>, characters::Policy::Implicit, std::remove_cv_t<T> >::value )
constexpr operator T () const
 
template<typename T>
requires ( alib::characters::IsExplicitArrayCast<T, TChar> && !alib::strings::NoAutoCastTraits< TString<TChar>, characters::Policy::ExplicitOnly, std::remove_cv_t<T> >::value )
constexpr operator T () const
 
constexpr TStringoperator= (const TString &) noexcept=default
 
constexpr TStringoperator= (TString &&) noexcept=default
 
constexpr const TChar * Buffer () const
 
constexpr integer Length () const
 
integer WStringLength () const
 
constexpr bool IsNull () const
 
constexpr bool IsNotNull () const
 
constexpr bool IsEmpty () const
 
constexpr bool IsNotEmpty () const
 
template<typename TCheck = CHK>
TString< TChar > Substring (integer regionStart, integer regionLength=MAX_LEN) const
 
template<typename TCheck = CHK>
TChar CharAt (integer idx) const
 
template<typename TCheck = CHK>
TChar CharAtStart () const
 
template<typename TCheck = CHK>
TChar CharAtEnd () const
 
TChar operator[] (integer idx) const
 
std::size_t Hashcode () const
 
std::size_t HashcodeIgnoreCase () const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
bool Equals (const TString< TChar > &rhs) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
int CompareTo (const TString< TChar > &rhs) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
int CompareTo (const TString &rhs, integer rhsRegionStart, integer rhsRegionLength=MAX_LEN) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
int CompareTo (const TString &rhs, integer rhsRegionStart, integer rhsRegionLength, integer regionStart, integer regionLength=MAX_LEN) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
bool ContainsAt (const TString &needle, integer pos) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
bool StartsWith (const TString &needle) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
bool EndsWith (const TString &needle) const
 
template<typename TCheck = CHK>
integer IndexOf (TChar needle, integer startIdx=0) const
 
template<typename TCheck = CHK>
integer IndexOf (TChar needle, integer regionStart, integer regionLength) const
 
integer IndexOfOrLength (TChar needle) const
 
template<typename TCheck = CHK>
integer IndexOfOrLength (TChar needle, integer startIdx) const
 
template<typename TCheck = CHK>
integer LastIndexOf (TChar needle, integer startIndex=MAX_LEN) const
 
template<lang::Inclusion TInclusion, typename TCheck = CHK>
integer IndexOfAny (const TString &needles, integer startIdx=0) const
 
template<lang::Inclusion TInclusion, typename TCheck = CHK>
integer LastIndexOfAny (const TString &needles, integer startIdx=MAX_LEN) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
integer IndexOf (const TString &needle, integer startIdx=0, integer endIdx=strings::MAX_LEN) const
 
template<typename TCheck = CHK>
integer IndexOfFirstDifference (const TString &needle, lang::Case sensitivity=lang::Case::Sensitive, integer startIdx=0) const
 
integer IndexOfSegmentEnd (TChar opener, TChar closer, integer idx) const
 
template<typename TCheck = CHK>
integer CountChar (TChar needle, integer startPos=0) const
 
template<typename TCheck = CHK>
integer CountChar (TChar needle, TChar omit, integer startPos) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
integer Count (const TString &needle, integer startPos=0) const
 
template<typename TCheck = CHK, lang::Case TSensitivity = lang::Case::Sensitive>
integer Count (const TString &needle, const TString &omit, integer startPos=0) const
 
ALIB_DLL uint64_t ParseDecDigits (integer startIdx=0, integer *newIdx=nullptr) const
 
ALIB_DLL int64_t ParseInt (integer startIdx=0, TNumberFormat< TChar > *numberFormat=nullptr, integer *newIdx=nullptr) const
 
int64_t ParseInt (TNumberFormat< TChar > *numberFormat, integer *newIdx=nullptr) const
 
int64_t ParseInt (integer *newIdx) const
 
int64_t ParseInt (integer startIdx, integer *newIdx) const
 
ALIB_DLL uint64_t ParseDec (integer startIdx=0, TNumberFormat< TChar > *numberFormat=nullptr, integer *newIdx=nullptr) const
 
uint64_t ParseDec (TNumberFormat< TChar > *numberFormat, integer *newIdx=nullptr) const
 
uint64_t ParseDec (integer *newIdx) const
 
uint64_t ParseDec (integer startIdx, integer *newIdx) const
 
ALIB_DLL uint64_t ParseBin (integer startIdx=0, TNumberFormat< TChar > *numberFormat=nullptr, integer *newIdx=nullptr) const
 
uint64_t ParseBin (TNumberFormat< TChar > *numberFormat, integer *newIdx=nullptr) const
 
uint64_t ParseBin (integer *newIdx) const
 
uint64_t ParseBin (integer startIdx, integer *newIdx) const
 
ALIB_DLL uint64_t ParseHex (integer startIdx=0, TNumberFormat< TChar > *numberFormat=nullptr, integer *newIdx=nullptr) const
 
uint64_t ParseHex (TNumberFormat< TChar > *numberFormat, integer *newIdx=nullptr) const
 
uint64_t ParseHex (integer *newIdx) const
 
uint64_t ParseHex (integer startIdx, integer *newIdx) const
 
ALIB_DLL uint64_t ParseOct (integer startIdx=0, TNumberFormat< TChar > *numberFormat=nullptr, integer *newIdx=nullptr) const
 
uint64_t ParseOct (TNumberFormat< TChar > *numberFormat, integer *newIdx=nullptr) const
 
uint64_t ParseOct (integer *newIdx) const
 
uint64_t ParseOct (integer startIdx, integer *newIdx) const
 
ALIB_DLL double ParseFloat (integer startIdx=0, TNumberFormat< TChar > *numberFormat=nullptr, integer *newIdx=nullptr) const
 
double ParseFloat (TNumberFormat< TChar > *numberFormat, integer *newIdx=nullptr) const
 
double ParseFloat (integer *newIdx) const
 
double ParseFloat (integer startIdx, integer *newIdx) const
 
integer CopyTo (TChar *dest) const
 
template<typename TAllocator>
requires alib::lang::IsAllocator<TAllocator>
void Allocate (TAllocator &allocator, const TString< TChar > &copy)
 
template<typename TAllocator>
requires alib::lang::IsAllocator<TAllocator>
void Free (TAllocator &allocator)
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator end () const
 
const_iterator cend () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
size_type size () const
 
bool AdjustRegion (integer &regionStart, integer &regionLength) const
 
- Public Method Index: inherited from alib::lang::AllocatorMember< TAllocator >
template<typename TIf = TAllocator>
requires std::is_default_constructible_v<TIf>
 AllocatorMember ()
 
 AllocatorMember (TAllocator &pAllocator) noexcept
 
AllocatorInterface< TAllocator > AI () const noexcept
 
TAllocator & GetAllocator () const noexcept
 

Additional Inherited Members

- Public Type Index: inherited from alib::strings::TAString< TChar, TAllocator >
using AllocatorType
 Exposes the allocator type specified by template parameter TAllocator.
 
using iterator
 
using reverse_iterator
 Same as iterator, but working from the end to the start of the string.
 
- Public Type Index: inherited from alib::strings::TString< TChar >
using size_type = integer
 The type defining sizes of strings.
 
using value_type = TChar
 Exposes template parameter TChar to the outer world in a std compatible way.
 
using const_iterator = TRandomAccessIterator<const TChar>
 
using const_reverse_iterator = std::reverse_iterator<const_iterator>
 
- Public Type Index: inherited from alib::lang::AllocatorMember< TAllocator >
using AllocatorType = TAllocator
 Exposes the allocator type.
 
- Protected Type Index: inherited from alib::strings::TLocalString< TChar, TCapacity, TAllocator >
using base
 The base AString-type.
 
using sBase
 The base String-type.
 
- Protected Type Index: inherited from alib::strings::TAString< TChar, TAllocator >
using allocBase
 The type of the base class that stores the allocator.
 
using base
 The base string-type.
 
- Protected Field Index: inherited from alib::strings::TLocalString< TChar, TCapacity, TAllocator >
TChar localBuffer [TCapacity]
 
- Protected Field Index: inherited from alib::strings::TAString< TChar, TAllocator >
integer capacity
 
integer capacity
 
bool dbgWarnWhenExternalBufferIsReplaced
 
bool dbgWarnWhenExternalBufferIsReplaced
 
integer debugLastAllocRequest
 
integer debugLastAllocRequest
 
- Protected Field Index: inherited from alib::strings::TString< TChar >
const TChar * buffer
 
integer length
 
- Protected Field Index: inherited from alib::lang::AllocatorMember< TAllocator >
TAllocator * allocator
 The allocator stored.
 
- Protected Method Index: inherited from alib::strings::TAString< TChar, TAllocator >
constexpr TAString (TAllocator &pAllocator, TChar *extBuffer, integer extBufferSize)
 
constexpr TAString (TAllocator &pAllocator, TChar *extBuffer, integer extBufferSize)
 
constexpr TAString (TChar *extBuffer, integer extBufferSize)
 
constexpr TAString (TChar *extBuffer, integer extBufferSize)
 
- Protected Method Index: inherited from alib::strings::TString< TChar >
template<lang::Case TSensitivity = lang::Case::Sensitive>
ALIB_DLL integer indexOfString (const TString &needle, integer startIdx, integer endIdx) const
 

Constructor(s) / Destructor Details:

◆ TLocalStringNoWarning() [1/2]

template<typename TChar, integer TCapacity, typename TAllocator>
alib::strings::TLocalStringNoWarning< TChar, TCapacity, TAllocator >::TLocalStringNoWarning ( )
inlineconstexpr

Default constructor.

Definition at line 273 of file localstring.inl.

Here is the call graph for this function:

◆ TLocalStringNoWarning() [2/2]

template<typename TChar, integer TCapacity, typename TAllocator>
alib::strings::TLocalStringNoWarning< TChar, TCapacity, TAllocator >::TLocalStringNoWarning ( const String & src)
inline

Constructor taking a string to copy.

Parameters
srcThe string to copy into this object.

Definition at line 279 of file localstring.inl.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: