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.
TChar | The character type. |
TCapacity | The capacity of local, embedded string buffer. |
TAllocator | The allocator to use. |
Definition at line 258 of file localstring.hpp.
#include <localstring.hpp>
Public Method Index: | |
constexpr | TLocalStringNoWarning () |
Default constructor. | |
TLocalStringNoWarning (const String &src) | |
Public Method Index: inherited from TLocalString< TChar, TCapacity, TAllocator > | |
constexpr | TLocalString () |
TLocalString (const TAppendable &src) | |
TLocalString (const TLocalString ©) | |
constexpr | TLocalString (TAllocator &pAllocator) |
TLocalString (TLocalString &&move) noexcept | |
TLocalString & | operator= (const TLocalString ©) |
TLocalString & | operator= (TLocalString &&move) |
Public Method Index: inherited from TAString< TChar, TAllocator > | |
constexpr | TAString () |
Constructs an empty, nulled AString (does not allocate a buffer). | |
template<class TAppendable > | |
TAString (const TAppendable &src) | |
TAString (const TAString ©) | |
constexpr | TAString (TAllocator &pAllocator) |
TAString (TAString &&move) noexcept | |
~TAString () noexcept | |
Destructs an AString object. An internally allocated buffer will be deleted. | |
template<typename TCharArray > | |
operator TCharArray () const | |
template<typename TCharArray > | |
operator TCharArray () const | |
TAString & | operator= (const TAString ©) |
void | dbgCheck () const |
void | DbgDisableBufferReplacementWarning () |
ALIB_API void | SetBuffer (integer newCapacity) |
ALIB_API void | SetBuffer (TChar *extBuffer, integer extBufferSize, integer extLength=0, lang::Responsibility responsibility=lang::Responsibility::KeepWithSender) |
void | EnsureRemainingCapacity (integer spaceNeeded) |
ALIB_API void | GrowBufferAtLeastBy (integer minimumGrowth) |
integer | Capacity () const |
bool | HasInternalBuffer () const |
void | SetNull () |
Invokes SetBuffer(0). | |
constexpr const TChar * | Terminate () const |
TChar * | VBuffer () const |
template<typename TCheck = CHK> | |
void | SetCharAt (integer idx, TChar c) |
TChar & | operator[] (integer idx) |
void | SetLength (integer newLength) |
void | DetectLength () |
TAString & | ShortenTo (integer newLength) |
template<typename TCheck = CHK, typename TCharSrc > | |
TAString & | Append (const TCharSrc *src, integer srcLength) |
template<typename TCheck = CHK> | |
TAString & | Append (const TChar *src, integer srcLength) |
template<typename TCheck = CHK> | |
TAString & | Append (const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN) |
template<typename TCheck = CHK> | |
TAString & | _ (const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN) |
TAString & | NewLine () |
template<typename TCheck = CHK, typename TAppendable > | |
TAString & | Append (const TAppendable &src) |
template<typename TCheck = CHK, class TAppendable > | |
TAString & | _ (const TAppendable &src) |
template<class TAppendable > | |
TAString & | operator<< (const TAppendable &src) |
TAString & | Reset () |
template<typename TCheck = CHK, typename TAppendable > | |
TAString & | Reset (const TAppendable &src) |
TAString & | _ () |
template<typename TCheck = CHK> | |
TAString & | InsertAt (const TString< TChar > &src, integer pos) |
template<typename TCheck = CHK> | |
TAString & | InsertChars (TChar c, integer qty) |
template<typename TCheck = CHK> | |
TAString & | InsertChars (TChar c, integer qty, integer pos) |
template<typename TCheck = CHK> | |
TAString & | Delete (integer regionStart, integer regionLength=MAX_LEN) |
template<typename TCheck = CHK> | |
TAString & | DeleteStart (integer regionLength) |
TAString & | DeleteStart (const TString< TChar > &deleteIfMatch) |
template<typename TCheck = CHK> | |
TAString & | DeleteEnd (integer regionLength) |
TAString & | DeleteEnd (const TString< TChar > &deleteIfMatch) |
ALIB_API TAString & | Trim (const TCString< TChar > &trimChars=TT_CStringConstants< TChar >::DefaultWhitespaces()) |
ALIB_API integer | TrimAt (integer idx, const TCString< TChar > &trimChars=TT_CStringConstants< TChar >::DefaultWhitespaces()) |
TAString & | TrimStart (const TCString< TChar > &trimChars=TT_CStringConstants< TChar >::DefaultWhitespaces()) |
TAString & | TrimEnd (const TCString< TChar > &trimChars=TT_CStringConstants< TChar >::DefaultWhitespaces()) |
Iterator | begin () |
Iterator | end () |
ALIB_WARNINGS_RESTORE ReverseIterator | rbegin () |
ReverseIterator | rend () |
template<typename TCheck = CHK> | |
TAString & | ReplaceSubstring (const TString< TChar > &src, integer regionStart, integer regionLength) |
template<typename TCheck = CHK> | |
TAString & | ReplaceRegion (TChar c, integer regionStart, integer regionLength) |
ALIB_API integer | SearchAndReplace (TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN) |
ALIB_API 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) |
template<typename TCheck = CHK> | |
TAString & | ToUpper (integer regionStart=0, integer regionLength=MAX_LEN) |
template<typename TCheck = CHK> | |
TAString & | ToLower (integer regionStart=0, integer regionLength=MAX_LEN) |
template<typename TCheck = CHK> | |
TAString & | Reverse (integer regionStart=0, integer regionLength=MAX_LEN) |
ConstIterator | begin () const |
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE ConstIterator | end () const |
ALIB_WARNINGS_RESTORE ConstReverseIterator | rbegin () const |
ConstReverseIterator | rend () const |
Public Method Index: inherited from TString< TChar > | |
constexpr | TString () noexcept=default |
Defaulted default constructor. | |
constexpr | TString (const TChar *pBuffer, integer pLength) noexcept |
template<typename TCharArray > | |
constexpr | TString (const TCharArray &src) |
constexpr | TString (const TString &) noexcept=default |
Defaulted copy constructor. | |
TString (ConstIterator &start, ConstIterator &end) | |
template<typename TAllocator , typename TEnableIf = typename TAllocator::ChainedAllocator> | |
TString (TAllocator &allocator, const TString< TChar > ©) | |
constexpr | TString (TString &&) noexcept=default |
Defaulted move constructor. | |
template<typename TCharArray > | |
operator TCharArray () const | |
template<typename TCharArray > | |
operator TCharArray () const | |
TString & | operator= (const TString &) noexcept=default |
TString & | operator= (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> | |
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE integer | IndexOfOrLength (TChar needle, integer startIdx) const |
template<typename TCheck = CHK> | |
ALIB_WARNINGS_RESTORE 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_API uint64_t | ParseDecDigits (integer startIdx=0, integer *newIdx=nullptr) const |
ALIB_API 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_API 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_API 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_API 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_API 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_API 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 > | |
void | Allocate (TAllocator &allocator, const TString< TChar > ©) |
template<typename TAllocator > | |
void | Free (TAllocator &allocator) |
ConstIterator | begin () const |
ConstIterator | cbegin () const |
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE ConstIterator | end () const |
ConstIterator | cend () const |
ALIB_WARNINGS_RESTORE ConstReverseIterator | rbegin () const |
ConstReverseIterator | rend () const |
ConstReverseIterator | crbegin () const |
ConstReverseIterator | crend () const |
bool | AdjustRegion (integer ®ionStart, integer ®ionLength) const |
Public Method Index: inherited from AllocatorMember< TAllocator > | |
AllocatorMember ()=delete | |
Deleted default constructor. (The allocator has to be given with construction) | |
AllocatorMember (TAllocator &pAllocator) noexcept | |
AllocatorInterface< TAllocator > | AI () const noexcept |
TAllocator & | GetAllocator () const noexcept |
Additional Inherited Members | |
Public Type Index: inherited from TAString< TChar, TAllocator > | |
using | AllocatorType = TAllocator |
Exposes the allocator type specified by template parameter TAllocator. | |
using | Iterator = typename base::template TRandomAccessIterator<TChar> |
using | ReverseIterator = std::reverse_iterator<Iterator> |
Same as Iterator, but working from the end to the start of the string. | |
Public Type Index: inherited from TString< TChar > | |
using | CharType = TChar |
Expose template parameter TChar to the outer world. | |
using | ConstIterator = TRandomAccessIterator<const TChar> |
using | ConstReverseIterator = std::reverse_iterator<ConstIterator> |
Public Type Index: inherited from AllocatorMember< TAllocator > | |
using | AllocatorType = TAllocator |
Exposes the allocator type. | |
Protected Type Index: inherited from TLocalString< TChar, TCapacity, TAllocator > | |
using | base |
The base AString-type. | |
using | sBase |
The base String-type. | |
Protected Type Index: inherited from TAString< TChar, TAllocator > | |
using | allocBase = lang::AllocatorMember<TAllocator> |
The allocator type that TAllocator specifies. | |
using | base = TString<TChar> |
The base string-type. | |
Protected Field Index: inherited from TLocalString< TChar, TCapacity, TAllocator > | |
TChar | localBuffer [TCapacity] |
Protected Field Index: inherited from TAString< TChar, TAllocator > | |
integer | capacity |
bool | dbgWarnWhenExternalBufferIsReplaced = true |
integer | debugLastAllocRequest =0 |
Protected Field Index: inherited from TString< TChar > | |
const TChar * | buffer |
integer | length |
Protected Field Index: inherited from AllocatorMember< TAllocator > | |
TAllocator & | allocator |
A reference to the allocator. | |
Protected Method Index: inherited from TAString< TChar, TAllocator > | |
constexpr | TAString (TAllocator &pAllocator, TChar *extBuffer, integer extBufferSize) |
constexpr | TAString (TChar *extBuffer, integer extBufferSize) |
Protected Method Index: inherited from TString< TChar > | |
template<lang::Case TSensitivity = lang::Case::Sensitive> | |
ALIB_API integer | indexOfString (const TString &needle, integer startIdx, integer endIdx) const |
|
inlineconstexpr |
Default constructor.
Definition at line 262 of file localstring.hpp.
|
inline |
Constructor taking a string to copy.
src | The string to copy into this object. |
Definition at line 270 of file localstring.hpp.