Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Friends | List of all members
Burger::String Class Reference

UTF 8 bit string class. More...

Public Member Functions

 String (void) noexcept
 Creates an empty string.
 
 String (const String &rInput) noexcept
 Initialize a Burger::String with a Burger::String.
 
 String (String &&rInput) noexcept
 Copy constructor.
 
Stringoperator= (String &&rInput) noexcept
 Copy assignment operator.
 
 String (const String &rInput, uintptr_t uStart, uintptr_t uLength) noexcept
 Initialize a Burger::String by using a subsection of a different Burger::String.
 
 String (const char *pInput) noexcept
 Initialize with a "C" string.
 
 String (const char *pInput, uintptr_t uPadding) noexcept
 Initialize with a "C" string with padding.
 
 String (const uint16_t *pInput) noexcept
 Initialize with a UTF16 string.
 
 String (const uint32_t *pInput) noexcept
 Initialize with a UTF32 string.
 
 String (const char *pInput, uintptr_t uStart, uintptr_t uEnd) noexcept
 Initialize a Burger::String by using a subsection of a different "C" string.
 
 String (char iInput) noexcept
 Initialize a Burger::String with a single character.
 
 String (char iInput, uintptr_t uFillSize) noexcept
 Initialize a Burger::String filled with a single character.
 
 String (const char *pInput1, const char *pInput2) noexcept
 Initialize a Burger::String with two concatenated "C" strings.
 
 String (const char *pInput1, const char *pInput2, const char *pInput3) noexcept
 Initialize a Burger::String with three concatenated "C" strings.
 
 String (const char *pInput1, const char *pInput2, const char *pInput3, const char *pInput4) noexcept
 Initialize a Burger::String with four concatenated "C" strings.
 
 String (const char *pFmt, BURGER_SP_ARG1) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG2) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG3) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG4) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG5) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG6) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG7) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG8) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG9) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG10) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG11) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG12) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG13) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG14) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG15) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG16) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG17) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG18) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG19) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG20) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG21) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG22) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG23) noexcept
 
 String (const char *pFmt, BURGER_SP_ARG24) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG1) noexcept
 String.Printf(const char* pFmt, ....
 
void Printf (const char *pFmt, BURGER_SP_ARG2) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG3) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG4) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG5) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG6) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG7) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG8) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG9) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG10) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG11) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG12) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG13) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG14) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG15) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG16) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG17) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG18) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG19) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG20) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG21) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG22) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG23) noexcept
 
void Printf (const char *pFmt, BURGER_SP_ARG24) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG1) noexcept
 String.Printf(const String& pFmt, ....
 
void Printf (const String &sFmt, BURGER_SP_ARG2) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG3) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG4) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG5) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG6) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG7) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG8) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG9) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG10) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG11) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG12) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG13) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG14) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG15) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG16) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG17) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG18) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG19) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG20) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG21) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG22) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG23) noexcept
 
void Printf (const String &sFmt, BURGER_SP_ARG24) noexcept
 
 ~String (void)
 Release memory, if any.
 
 operator char * () noexcept
 Return the pointer to the string.
 
 operator const char * () const noexcept
 Return the const pointer to the string.
 
const charc_str (void) const noexcept
 Return the const pointer to the string.
 
charc_str (void) noexcept
 Return the pointer to the string.
 
const chardata (void) const noexcept
 Return the const pointer to the string.
 
chardata (void) noexcept
 Return the pointer to the string.
 
 operator char () const noexcept
 Return the first character of the "C" string.
 
uintptr_t length (void) const noexcept
 Return the length of the "C" string.
 
uintptr_t size (void) const noexcept
 Return the length of the "C" string.
 
uintptr_t capacity (void) const noexcept
 Return the size of the buffer.
 
uint_t empty (void) const noexcept
 Return TRUE if the string is empty.
 
eError assign (uintptr_t uLength, char iInput) noexcept
 Fill the string with a character.
 
eError assign (const String &rInput) noexcept
 Copy a String into this string.
 
void assign (String &&rInput) noexcept
 Move a String into this string.
 
eError assign (const char *pInput) noexcept
 Copy a "C" string to a Burger::String.
 
eError assign (const char *pInput, uintptr_t uLength) noexcept
 Copy an array of characters into a string.
 
eError assign (const uint16_t *pInput) noexcept
 Copy a 16 bit "C" string to a Burger::String.
 
eError assign (const uint16_t *pInput, uintptr_t uLength) noexcept
 Copy a 16 bit "C" string to a Burger::String.
 
eError assign_win437 (const char *pInput) noexcept
 Copy a "C" string encoded with Win437 into the String.
 
eError assign_win437 (const char *pInput, uintptr_t uLength) noexcept
 Copy a buffer encoded with Win437 into the String.
 
eError assign_win1252 (const char *pInput) noexcept
 Copy a "C" string encoded with Win1252 into the String.
 
eError assign_win1252 (const char *pInput, uintptr_t uLength) noexcept
 Copy a buffer encoded with Win1252 into the String.
 
eError assign_mac_roman_us (const char *pInput) noexcept
 Copy a "C" string encoded with MacRomanUS into the String.
 
eError assign_mac_roman_us (const char *pInput, uintptr_t uLength) noexcept
 Copy a buffer encoded with MacRomanUS into the String.
 
eError resize (uintptr_t uSize) noexcept
 Force a buffer size.
 
eError reserve (uintptr_t uNewBufferSize) noexcept
 Ensure a minimum buffer size.
 
uintptr_t find (const String &rInput, uintptr_t uPosition=0) const noexcept
 Locate a String in a String.
 
uintptr_t find (const char *pInput, uintptr_t uPosition=0) const noexcept
 Locate a "C" string in a String.
 
uintptr_t find (const char *pInput, uintptr_t uPosition, uintptr_t uInputSize) const noexcept
 Locate a buffer in a String.
 
uintptr_t find (char iInput, uintptr_t uPosition=0) const noexcept
 Locate a character in a String.
 
Stringoperator= (char iInput) noexcept
 Assign a single character length string to this Burger::String.
 
Stringoperator= (const char *pInput) noexcept
 Assign a "C" string to a Burger::String.
 
Stringoperator= (const uint16_t *pInput) noexcept
 Assign a 16 bit "C" string to a Burger::String.
 
Stringoperator= (const String &rInput) noexcept
 Assign a Burger::String.
 
Stringoperator+= (char iInput) noexcept
 Append a single character to the current string.
 
Stringoperator+= (const char *pInput) noexcept
 Append a UTF8 "C" string to the current string.
 
Stringoperator+= (const uint16_t *pInput) noexcept
 Append a UTF16 "C" string to the current string.
 
Stringoperator+= (const String &rInput) noexcept
 Append a Burger::String to the current string.
 
String operator() (uintptr_t uStart, uintptr_t uLength) const noexcept
 Create a new Burger::String from a substring.
 
charoperator() (uintptr_t uInput) noexcept
 Return the reference to a location in the string.
 
char constoperator() (uintptr_t uInput) const noexcept
 Return the reference to a location in the string.
 
charoperator[] (uintptr_t uInput) noexcept
 Return the reference to a location in the string.
 
char constoperator[] (uintptr_t uInput) const noexcept
 Return the reference to a location in the string.
 
char Get (uintptr_t uWhere) const noexcept
 Return a single character from the string.
 
void Put (uintptr_t uWhere, char cInput) noexcept
 Modify a single character in the string.
 
StringToLowercase (void) noexcept
 Convert the string to lower case.
 
StringToUppercase (void) noexcept
 Convert the string to upper case.
 
String Lowercase (void) const noexcept
 Return a lowercase copy of the string.
 
String Uppercase (void) const noexcept
 Return an uppercase copy of the string.
 
uint_t operator! () const noexcept
 Return TRUE if the string is empty.
 
uint_t IsValid (void) const noexcept
 Return TRUE if the string has characters.
 
void clear (void) noexcept
 Clear out the data.
 
uintptr_t copy (char *pOutput, uintptr_t uOutputSize=UINTPTR_MAX) const noexcept
 Extract the string into a buffer of a specific size.
 
uintptr_t PCopy (uint8_t *pOutput, uintptr_t uOutputSize=256) const noexcept
 Extract the string into a Pascal buffer of a specific size.
 
uintptr_t Remove (uintptr_t uStart, uintptr_t uLength=UINTPTR_MAX) noexcept
 Remove a part of the string.
 
eError insert (uintptr_t uStart, const char *pInput, uintptr_t uInputSize) noexcept
 Insert a string into a current String.
 
eError push_back (char iInput) noexcept
 Append a single character to the current string.
 
char pop_back (void) noexcept
 Remove the last character from a string.
 
eError append (const char *pInput) noexcept
 Append a UTF8 string buffer to the current string.
 
eError append (const uint16_t *pInput) noexcept
 Append a UTF16 string buffer to the current string.
 
eError append (const String &rInput) noexcept
 Append a UTF8 string buffer to the current string.
 
eError append (const char *pInput, uintptr_t uInputSize) noexcept
 Append a UTF8 string buffer to the current string.
 
StringLeft (uintptr_t uNewLength, char iInput=' ') noexcept
 Resize a string and either truncate or append with a fill character.
 
StringRight (uintptr_t uNewLength, char iInput=' ') noexcept
 Resize a string and either truncate or prepend with a fill character.
 
uint_t starts_with (char iInput) noexcept
 Test if the string starts with a char.
 
uint_t starts_with (const char *pInput) noexcept
 Test if the string starts with a "C" string.
 
uint_t starts_with (const char *pInput, uintptr_t uLength) noexcept
 Test if the string starts with a buffer of data.
 
uint_t ends_with (char iInput) noexcept
 Test if the string ends with a char.
 
uint_t ends_with (const char *pInput) noexcept
 Test if the string ends with a "C" string.
 
uint_t ends_with (const char *pInput, uintptr_t uLength) noexcept
 Test if the string ends with a buffer of data.
 
int Compare (const String &rInput) const noexcept
 Compare the string.
 
int Compare (const char *pInput) const noexcept
 Compare the string.
 
int Compare (char iInput) const noexcept
 Compare the string to a single character.
 
uintptr_t RemoveChars (const char *pInput) noexcept
 Remove each and every char in the list.
 
uintptr_t RemoveChar (char iInput) noexcept
 Remove a specific character from the string.
 
uintptr_t NormalizeLineFeeds (void) noexcept
 Normalize Mac and PC line feeds to Linux/Unix format.
 
uint_t GetBoolean (uint_t bDefault) const noexcept
 Convert an ASCII string into a boolean.
 
void SetTrueFalse (uint_t bInput) noexcept
 Set the string to "true" or "false".
 
void SetYesNo (uint_t bInput) noexcept
 Set the string to "true" or "false".
 
uint_t GetWord (uint_t uDefault, uint_t uMin=0, uint_t uMax=0xFFFFFFFFU) const noexcept
 Return an unsigned integer value.
 
void SetWord (uint_t uInput) noexcept
 Set an unsigned integer value.
 
void SetWordHex (uint_t uInput) noexcept
 Set an unsigned integer value as hex.
 
int_t GetInt (int_t iDefault, int_t iMin=(- 0x7FFFFFFF) - 1, int_t iMax=0x7FFFFFFF) const noexcept
 Return a signed integer value.
 
void SetInt (int_t iInput) noexcept
 Set a signed integer value.
 
float GetFloat (float fDefault) const noexcept
 Return a floating point value.
 
float GetFloat (float fDefault, float fMin, float fMax) const noexcept
 Return a floating point value.
 
void SetFloat (float fValue) noexcept
 Set a 32 bit floating point value.
 
double GetDouble (double dDefault) const noexcept
 Return a 64 bit floating point value.
 
double GetDouble (double dDefault, double dMin, double dMax) const noexcept
 Return a 64 bit floating point value.
 
void SetDouble (double dValue) noexcept
 Set a 64 bit floating point value.
 

Static Public Attributes

static const uint_t kBufferSize
 Ensures the structure is 96 bytes in size on all platforms.
 
static const uintptr_t npos = UINTPTR_MAX
 Value returned when find() doesn't return a match.
 

Protected Member Functions

charconstructor_reserve (uintptr_t uBufferSize) noexcept
 Create buffer for constructors.
 
void assign_small (const char *pInput) noexcept
 Copy "C" string without safeguards.
 
void assign_small (const char *pInput, uintptr_t uLength) noexcept
 Copy an array of characters to a String with shortcuts.
 

Protected Attributes

charm_pData
 Pointer to the string.
 
uintptr_t m_uLength
 Length of the string.
 
uintptr_t m_uBufferSize
 Size of the buffer, minimum kBufferSize.
 
char m_Raw [kBufferSize]
 Temp preallocated buffer for most strings.
 

Private Member Functions

void InitFormattedString (const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 

Static Private Member Functions

static uint_t FormattedAllocCallback (uint_t bError, uintptr_t uRequestedSize, void **ppOutputBuffer, void *pContext) noexcept
 

Friends

uint_t operator== (String const &rInput1, String const &rInput2) noexcept
 Return TRUE if the strings are equal (Case sensitive)
 
uint_t operator== (String const &rInput1, const char *pInput2) noexcept
 Return TRUE if the strings are equal (Case sensitive)
 
uint_t operator== (const char *pInput1, String const &rInput2) noexcept
 Return TRUE if the strings are equal (Case sensitive)
 
uint_t operator== (String const &rInput1, char cInput2) noexcept
 Return TRUE if the strings are equal (Case sensitive)
 
uint_t operator== (char cInput1, String const &rInput2) noexcept
 Return TRUE if the strings are equal (Case sensitive)
 
uint_t operator!= (String const &rInput1, String const &rInput2) noexcept
 Return TRUE if the strings are not equal (Case sensitive)
 
uint_t operator!= (String const &rInput1, const char *pInput2) noexcept
 Return TRUE if the strings are not equal (Case sensitive)
 
uint_t operator!= (const char *pInput1, String const &rInput2) noexcept
 Return TRUE if the strings are not equal (Case sensitive)
 
uint_t operator!= (String const &rInput1, char cInput2) noexcept
 Return TRUE if the strings are not equal (Case sensitive)
 
uint_t operator!= (char cInput1, String const &rInput2) noexcept
 Return TRUE if the strings are not equal (Case sensitive)
 
uint_t operator< (String const &rInput1, String const &rInput2) noexcept
 Return TRUE if the first is less than the second (Case sensitive)
 
uint_t operator< (String const &rInput1, const char *pInput2) noexcept
 Return TRUE if the first is less than the second (Case sensitive)
 
uint_t operator< (const char *pInput1, String const &rInput2) noexcept
 Return TRUE if the first is less than the second (Case sensitive)
 
uint_t operator< (String const &rInput1, char cInput2) noexcept
 Return TRUE if the first is less than the second (Case sensitive)
 
uint_t operator< (char cInput1, String const &rInput2) noexcept
 Return TRUE if the first is less than the second (Case sensitive)
 
uint_t operator<= (String const &rInput1, String const &rInput2) noexcept
 Return TRUE if the first is less than or equal to the second (Case sensitive)
 
uint_t operator<= (String const &rInput1, const char *pInput2) noexcept
 Return TRUE if the first is less than or equal to the second (Case sensitive)
 
uint_t operator<= (const char *pInput1, String const &rInput2) noexcept
 Return TRUE if the first is less than or equal to the second (Case sensitive)
 
uint_t operator<= (String const &rInput1, char cInput2) noexcept
 Return TRUE if the first is less than or equal to the second (Case sensitive)
 
uint_t operator<= (char cInput1, String const &rInput2) noexcept
 
uint_t operator> (String const &rInput1, String const &rInput2) noexcept
 Return TRUE if the first is greater than the second (Case sensitive)
 
uint_t operator> (String const &rInput1, const char *pInput2) noexcept
 Return TRUE if the first is greater than the second (Case sensitive)
 
uint_t operator> (const char *pInput1, String const &rInput2) noexcept
 Return TRUE if the first is greater than the second (Case sensitive)
 
uint_t operator> (String const &rInput1, char cInput2) noexcept
 Return TRUE if the first is greater than the second (Case sensitive)
 
uint_t operator> (char cInput1, String const &rInput2) noexcept
 Return TRUE if the first is greater than the second (Case sensitive)
 
uint_t operator>= (String const &rInput1, String const &rInput2) noexcept
 Return TRUE if the first is greater than or equal to the second (Case sensitive)
 
uint_t operator>= (String const &rInput1, const char *pInput2) noexcept
 Return TRUE if the first is greater than or equal to the second (Case sensitive)
 
uint_t operator>= (const char *pInput1, String const &rInput2) noexcept
 Return TRUE if the first is greater than or equal to the second (Case sensitive)
 
uint_t operator>= (String const &rInput1, char cInput2) noexcept
 Return TRUE if the first is greater than or equal to the second (Case sensitive)
 
uint_t operator>= (char cInput1, String const &rInput2) noexcept
 Return TRUE if the first is greater than or equal to the second (Case sensitive)
 

Detailed Description

UTF 8 bit string class.


This commonly used string class was designed for performance in mind. Each instance takes 64 bytes to contain data for the string and a pointer to allocated memory if the internal string buffer is too large. Since most strings rarely exceed 56 bytes in length, this class will be able to allocate and free strings with no calls to a memory manager. Only when the string exceeds the internal buffer will Burger::Alloc() and Burger::Free() be used.

Functions exist to convert UTF16 and UTF32 data into UTF8 format, which this string class uses internally for data storage.

See also
Burger::String16

Constructor & Destructor Documentation

◆ String() [1/38]

Burger::String::String ( void )
inlinenoexcept

Creates an empty string.


◆ String() [2/38]

Burger::String::String ( const String & rInput)
noexcept

Initialize a Burger::String with a Burger::String.


Parameters
rInputReference to a Burger::String

◆ String() [3/38]

Burger::String::String ( String && rInput)
noexcept

Copy constructor.


Only available on C++11 or higher.

Parameters
rInputReference to a Burger::String

◆ String() [4/38]

Burger::String::String ( const String & rInput,
uintptr_t uStart,
uintptr_t uLength )
noexcept

Initialize a Burger::String by using a subsection of a different Burger::String.


Given a starting (inclusive) and ending (exclusive) offset, grab the sub string and use it to create a new Burger::String

Note
If uEnd is less than or equal to uStart, the resulting string will be empty.
Parameters
rInputBurger::String to receive input from
uStartOffset to the first character to read from
uLengthNumber of characters to copy.

◆ String() [5/38]

Burger::String::String ( const char * pInput)
noexcept

Initialize with a "C" string.


Initialize the Burger::String with a copy of the passed string. The original string can be discarded after the call returns.

Parameters
pInputPointer to a valid "C" string or NULL to create an empty string

◆ String() [6/38]

Burger::String::String ( const char * pInput,
uintptr_t uPadding )
noexcept

Initialize with a "C" string with padding.


Initialize the Burger::String with a copy of the passed string. The original string can be discarded after the call returns. Allocate a buffer that can hold the initialization string + the uPadding number of bytes so the programmer can manually append data to the end of the string with Burger::StringCopy() or equivalent

Parameters
pInputPointer to a valid "C" string or NULL to create an empty string
uPaddingNumber of bytes to extend the string buffer. The extra bytes are NOT initialized

◆ String() [7/38]

Burger::String::String ( const uint16_t * pInput)
noexcept

Initialize with a UTF16 string.


Convert the UTF16 encoded input string into a UFT8 encoded string and initialize this class with the UTF8 version. The input string can be discarded after this call.

Parameters
pInputA pointer to a valid UTF16 "C" string

◆ String() [8/38]

Burger::String::String ( const uint32_t * pInput)
noexcept

Initialize with a UTF32 string.


Convert the UTF32 encoded input string into a UFT8 encoded string and initialize this class with the UTF8 version. The input string can be discarded after this call.

Parameters
pInputA pointer to a valid UTF32 "C" string

◆ String() [9/38]

Burger::String::String ( const char * pInput,
uintptr_t uStart,
uintptr_t uLength )
noexcept

Initialize a Burger::String by using a subsection of a different "C" string.


Copy a range of bytes from a "C" string. This will terminate early if a zero byte is found in the input stream.

Parameters
pInputA pointer to a valid "C" string
uStartOffset to the first character to read from
uLengthNumber of bytes to copy

◆ String() [10/38]

Burger::String::String ( char iInput)
noexcept

Initialize a Burger::String with a single character.


If the input character is zero, the resulting string will be empty

Note
It is NOT recommended to use "high ASCII" as input such as values 128-255. They are considered prefix codes as per the UTF8 standard and will yield undefined results for code that's expecting a valid UTF8 string
Parameters
iInputCharacter to convert to a single byte string

◆ String() [11/38]

Burger::String::String ( char iInput,
uintptr_t uFillSize )
noexcept

Initialize a Burger::String filled with a single character.


If the input character is zero, the resulting string will be empty

Parameters
iInputCharacter to fill the buffer with
uFillSizeSize, in bytes, of the resulting string

◆ String() [12/38]

Burger::String::String ( const char * pInput1,
const char * pInput2 )
noexcept

Initialize a Burger::String with two concatenated "C" strings.


If any input string pointer is NULL, it will be treated as an empty string.

Parameters
pInput1First string to initialize with
pInput2String to append after the first

◆ String() [13/38]

Burger::String::String ( const char * pInput1,
const char * pInput2,
const char * pInput3 )
noexcept

Initialize a Burger::String with three concatenated "C" strings.


If any input string pointer is NULL, it will be treated as an empty string.

Parameters
pInput1First string to initialize with
pInput2String to append after the first
pInput3String to append after the second

◆ String() [14/38]

Burger::String::String ( const char * pInput1,
const char * pInput2,
const char * pInput3,
const char * pInput4 )
noexcept

Initialize a Burger::String with four concatenated "C" strings.


If any input string pointer is NULL, it will be treated as an empty string.

Parameters
pInput1First string to initialize with
pInput2String to append after the first
pInput3String to append after the second
pInput4String to append after the third

◆ String() [15/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG1  )
inlinenoexcept

◆ String() [16/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG2  )
inlinenoexcept

◆ String() [17/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG3  )
inlinenoexcept

◆ String() [18/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG4  )
inlinenoexcept

◆ String() [19/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG5  )
inlinenoexcept

◆ String() [20/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG6  )
inlinenoexcept

◆ String() [21/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG7  )
inlinenoexcept

◆ String() [22/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG8  )
inlinenoexcept

◆ String() [23/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG9  )
inlinenoexcept

◆ String() [24/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG10  )
inlinenoexcept

◆ String() [25/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG11  )
inlinenoexcept

◆ String() [26/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG12  )
inlinenoexcept

◆ String() [27/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG13  )
inlinenoexcept

◆ String() [28/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG14  )
inlinenoexcept

◆ String() [29/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG15  )
inlinenoexcept

◆ String() [30/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG16  )
inlinenoexcept

◆ String() [31/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG17  )
inlinenoexcept

◆ String() [32/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG18  )
inlinenoexcept

◆ String() [33/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG19  )
inlinenoexcept

◆ String() [34/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG20  )
inlinenoexcept

◆ String() [35/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG21  )
inlinenoexcept

◆ String() [36/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG22  )
inlinenoexcept

◆ String() [37/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG23  )
inlinenoexcept

◆ String() [38/38]

Burger::String::String ( const char * pFmt,
BURGER_SP_ARG24  )
inlinenoexcept

◆ ~String()

Burger::String::~String ( void )
inline

Release memory, if any.


Releases any allocated memory for the string. Under most cases, this performs no operation.

Member Function Documentation

◆ append() [1/4]

Burger::eError BURGER_API Burger::String::append ( const char * pInput)
noexcept

Append a UTF8 string buffer to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty or nullptr , no operation is performed.

Parameters
pInputPointer to a "C" string to append
Returns
Zero if no error, non-zero on memory error.

◆ append() [2/4]

Burger::eError BURGER_API Burger::String::append ( const char * pInput,
uintptr_t uInputSize )
noexcept

Append a UTF8 string buffer to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty, no operation is performed.

Parameters
pInputPointer to a UTF8 string to append. NULL performs no operation
uInputSizeNumber of bytes to append
Returns
Zero if no error, non-zero on memory error.

◆ append() [3/4]

Burger::eError BURGER_API Burger::String::append ( const String & rInput)
noexcept

Append a UTF8 string buffer to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty, no operation is performed.

Parameters
rInputReference to the String to append with
Returns
Zero if no error, non-zero on memory error.

◆ append() [4/4]

Burger::eError BURGER_API Burger::String::append ( const uint16_t * pInput)
noexcept

Append a UTF16 string buffer to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty or nullptr , no operation is performed.

Parameters
pInputPointer to a UTF16 "C" string to append
Returns
Zero if no error, non-zero on memory error.

◆ assign() [1/7]

Burger::eError BURGER_API Burger::String::assign ( const char * pInput)
noexcept

Copy a "C" string to a Burger::String.


Note
This function allows using the tail end of the current string as input
Parameters
pInputPointer to a UTF8 "C" string. nullptr generates an empty string.
Returns
Zero if no error, non zero if memory allocation failed

◆ assign() [2/7]

Burger::eError BURGER_API Burger::String::assign ( const char * pInput,
uintptr_t uInputLength )
noexcept

Copy an array of characters into a string.


The input data will be converted into a string.

Parameters
pInputPointer to an array of UTF8 characters. nullptr generates an empty string.
uInputLengthLength of the input data
Returns
Zero if no error, non zero if memory allocation failed

◆ assign() [3/7]

Burger::eError BURGER_API Burger::String::assign ( const String & rInput)
noexcept

Copy a String into this string.


Copy the contents of the string into this string.

Parameters
rInputReference to the String to copy.
Returns
Zero if no error, non zero if memory allocation failed

◆ assign() [4/7]

Burger::eError BURGER_API Burger::String::assign ( const uint16_t * pInput)
noexcept

Copy a 16 bit "C" string to a Burger::String.


Parameters
pInputPointer to a UTF16 "C" string. nullptr generates an empty string.
Returns
Zero if no error, non zero if memory allocation failed

◆ assign() [5/7]

Burger::eError BURGER_API Burger::String::assign ( const uint16_t * pInput,
uintptr_t uLength )
noexcept

Copy a 16 bit "C" string to a Burger::String.


Parameters
pInputPointer to a UTF16 "C" string. nullptr generates an empty string.
uLengthLength of the UTF16 string in characters (sizeof(buffer)/2)
Returns
Zero if no error, non zero if memory allocation failed

◆ assign() [6/7]

void BURGER_API Burger::String::assign ( String && rInput)
noexcept

Move a String into this string.


Move the contents of the string into this string. The rvalue will be empty after this call completes.

Parameters
rInputReference to the String to copy.

◆ assign() [7/7]

Burger::eError BURGER_API Burger::String::assign ( uintptr_t uLength,
char iInput )
noexcept

Fill the string with a character.


Set the string size to uLength and fill the contents with iInput. The resulting string will be zero terminated.

Parameters
uLengthSize in bytes of the resulting string.
iInputCharacter to fill the buffer with.
Returns
Zero if no error, non zero if memory allocation failed

◆ assign_mac_roman_us() [1/2]

Burger::eError BURGER_API Burger::String::assign_mac_roman_us ( const char * pInput)
noexcept

Copy a "C" string encoded with MacRomanUS into the String.


Given a "C" string using MacRomanUS encoding, convert it to UTF8 and store it in the string.

Parameters
pInputPointer to a "C" string encoded with MacRomanUS. nullptr generates an empty string.
Returns
Zero if no error, non zero if memory allocation failed
See also
assign(const char *, uintptr_t)

◆ assign_mac_roman_us() [2/2]

Burger::eError BURGER_API Burger::String::assign_mac_roman_us ( const char * pInput,
uintptr_t uLength )
noexcept

Copy a buffer encoded with MacRomanUS into the String.


Given a buffer using MacRomanUS encoding, convert it to UTF8 and store it in the string.

Parameters
pInputPointer to a buffer encoded with MacRomanUS.
uLengthLength of the buffer.
Returns
Zero if no error, non zero if memory allocation failed
See also
assign(const char *, uintptr_t)

◆ assign_small() [1/2]

void BURGER_API Burger::String::assign_small ( const char * pInput)
protectednoexcept

Copy "C" string without safeguards.


If the string is under kBufferSize -1 bytes in length AND it's not using the a buffer where a call to MemoryCopy() would fail, then call this function to copy the string since it performs some optimizations that cannot be done if either case of the input data were true.

Note
Due to optimizations, some bounds checking is not performed. Do not call this function if the input string could be larger than kBufferSize-1 bytes in length!!!
Parameters
pInputPointer to a UTF8 "C" string that's less than kBufferSize in length. nullptr will page fault.

◆ assign_small() [2/2]

void BURGER_API Burger::String::assign_small ( const char * pInput,
uintptr_t uLength )
protectednoexcept

Copy an array of characters to a String with shortcuts.


If the string is under kBufferSize -1 bytes in length AND it's not using the a buffer where a call to MemoryCopy() would fail, then call this function to update the string since it performs some optimizations that cannot be done if either case of the input data were true. A zero will be appended to the final string. The input string should not contain a zero.

Note
Due to optimizations, some bounds checking is not performed. Do not call this function if the input string could be larger than kBufferSize-1 bytes in length!!!
Parameters
pInputPointer to a UTF8 "C" string that's less than kBufferSize in length. nullptr will page fault.
uLengthNumber of bytes to copy.

◆ assign_win1252() [1/2]

Burger::eError BURGER_API Burger::String::assign_win1252 ( const char * pInput)
noexcept

Copy a "C" string encoded with Win1252 into the String.


Given a "C" string using Win1252 encoding, convert it to UTF8 and store it in the string.

Parameters
pInputPointer to a "C" string encoded with Win1252. nullptr generates an empty string.
Returns
Zero if no error, non zero if memory allocation failed
See also
assign(const char *, uintptr_t)

◆ assign_win1252() [2/2]

Burger::eError BURGER_API Burger::String::assign_win1252 ( const char * pInput,
uintptr_t uLength )
noexcept

Copy a buffer encoded with Win1252 into the String.


Given a buffer using Win1252 encoding, convert it to UTF8 and store it in the string.

Parameters
pInputPointer to a buffer encoded with Win1252.
uLengthLength of the buffer.
Returns
Zero if no error, non zero if memory allocation failed
See also
assign(const char *, uintptr_t)

◆ assign_win437() [1/2]

Burger::eError BURGER_API Burger::String::assign_win437 ( const char * pInput)
noexcept

Copy a "C" string encoded with Win437 into the String.


Given a "C" string using Win437 encoding, convert it to UTF8 and store it in the string.

Parameters
pInputPointer to a "C" string encoded with Win437. nullptr generates an empty string.
Returns
Zero if no error, non zero if memory allocation failed
See also
assign(const char *, uintptr_t)

◆ assign_win437() [2/2]

Burger::eError BURGER_API Burger::String::assign_win437 ( const char * pInput,
uintptr_t uLength )
noexcept

Copy a buffer encoded with Win437 into the String.


Given a buffer using Win437 encoding, convert it to UTF8 and store it in the string.

Parameters
pInputPointer to a buffer encoded with Win437.
uLengthLength of the buffer.
Returns
Zero if no error, non zero if memory allocation failed
See also
assign(const char *, uintptr_t)

◆ c_str() [1/2]

Burger::String::c_str ( void ) const
inlinenoexcept

Return the const pointer to the string.


Helper to access the const pointer to the UTF8 ASCII string

Returns
Pointer to the const UTF8 "C" string.

◆ c_str() [2/2]

Burger::String::c_str ( void )
inlinenoexcept

Return the pointer to the string.


Helper to access the pointer to the UTF8 ASCII string

Returns
Pointer to the UTF8 "C" string.

◆ capacity()

Burger::String::capacity ( void ) const
inlinenoexcept

Return the size of the buffer.


Returns
The size of the buffer in bytes.

◆ clear()

void BURGER_API Burger::String::clear ( void )
noexcept

Clear out the data.


Set the string to an empty string

◆ Compare() [1/3]

int BURGER_API Burger::String::Compare ( char iInput) const
noexcept

Compare the string to a single character.


Compare two strings for equality using the rules found in the ANSI function strcmp(). This is a functional equivalent

Parameters
iInputCharacter to convert to a string of a single character in length. Zero will perform as if an empty string was passed in.
Returns
0 if equal, positive if greater and negative if lessor

◆ Compare() [2/3]

int BURGER_API Burger::String::Compare ( const char * pInput) const
noexcept

Compare the string.


Compare two strings for equality using the rules found in the ANSI function strcmp(). This is a functional equivalent

Parameters
pInputPointer to a "C" string to compare against. nullptr will perform as if an empty string was passed in.
Returns
0 if equal, positive if greater and negative if lessor

◆ Compare() [3/3]

int Burger::String::Compare ( const String & rInput) const
inlinenoexcept

Compare the string.


Compare two strings for equality using the rules found in the ANSI function strcmp(). This is a functional equivalent

Parameters
rInputReference to a Burger::String to compare against.
Returns
0 if equal, positive if greater and negative if lessor

◆ constructor_reserve()

char *BURGER_API Burger::String::constructor_reserve ( uintptr_t uBufferSize)
protectednoexcept

Create buffer for constructors.


This is a private function for constructors only. It will set up an initial buffer for storing a string requested by a constructor. If the allocation fails, the function will return nullptr.

Note
This function assumes the String object is uninitialized.
See also
String(const char *) or String(const String&)

◆ copy()

uintptr_t BURGER_API Burger::String::copy ( char * pOutput,
uintptr_t uOutputSize = UINTPTR_MAX ) const
noexcept

Extract the string into a buffer of a specific size.


This will truncate the string if the buffer is too small

Parameters
pOutputPointer to a buffer to receive the "C" string
uOutputSizeSize in bytes of the output buffer
Returns
Length of the string in bytes without the terminating zero
See also
Burger::String::PCopy(uint8_t *,uintptr_t) const

◆ data() [1/2]

Burger::String::data ( void ) const
inlinenoexcept

Return the const pointer to the string.


Helper to access the const pointer to the UTF8 ASCII string

Returns
Pointer to the const UTF8 "C" string.
See also
c_str(void) const

◆ data() [2/2]

Burger::String::data ( void )
inlinenoexcept

Return the pointer to the string.


Helper to access the pointer to the UTF8 ASCII string

Returns
Pointer to the UTF8 "C" string.
See also
c_str(void)

◆ empty()

Burger::String::empty ( void ) const
inlinenoexcept

Return TRUE if the string is empty.


Returns
TRUE or FALSE.

◆ ends_with() [1/3]

uint_t BURGER_API Burger::String::ends_with ( char iInput)
noexcept

Test if the string ends with a char.


If the string is not empty, test the last character for a match and return TRUE if so. Always return FALSE if the string is empty.

Note
Test is case sensitive.
Parameters
iInputCharacter to match
Returns
TRUE if a match, FALSE if not.
See also
starts_with(char)

◆ ends_with() [2/3]

uint_t BURGER_API Burger::String::ends_with ( const char * pInput)
noexcept

Test if the string ends with a "C" string.


If the string is not empty, test the input "C" string for a match and return TRUE if so. Always return FALSE if the string is empty. If the input string is empty, always return FALSE.

Note
Test is case sensitive.
Parameters
pInput"C" string to match. nullptr will return FALSE
Returns
TRUE if a match, FALSE if not.
See also
starts_with(const char *)

◆ ends_with() [3/3]

uint_t BURGER_API Burger::String::ends_with ( const char * pInput,
uintptr_t uLength )
noexcept

Test if the string ends with a buffer of data.


If the string is not empty, test the input buffer for a match and return TRUE if so. Always return FALSE if the string is empty. If the input buffer is empty, always return FALSE.

Note
Test is case sensitive.
Parameters
pInputText buffer to match.
uLengthLength of the text buffer. Zero will always return FALSE
Returns
TRUE if a match, FALSE if not.
See also
starts_with(const char *, uintptr_t)

◆ find() [1/4]

uintptr_t BURGER_API Burger::String::find ( char iInput,
uintptr_t uPosition = 0 ) const
noexcept

Locate a character in a String.


Starting from uPosition (Default = 0), scan the string for a character and return the offset into the string where the first match was found. Return npos if there was no match.

Parameters
iInputSingle ASCII character to match in the string.
uPositionOffset in elements of the string to begin the match.
Returns
0 to length()-1 or npos if no match.

◆ find() [2/4]

uintptr_t BURGER_API Burger::String::find ( const char * pInput,
uintptr_t uPosition,
uintptr_t uInputSize ) const
noexcept

Locate a buffer in a String.


Starting from uPosition (Default = 0), scan the string for a match to a buffer and return the offset into this string where the first match was found. Return npos if there was no match.

Note
If the size of the buffer to match is zero, it always matches.
Parameters
pInputPointer to the buffer to match.
uPositionOffset in elements of this string to begin the match.
uInputSizeLength of the buffer in elements.
Returns
0 to length()-1 or npos if no match.

◆ find() [3/4]

uintptr_t BURGER_API Burger::String::find ( const char * pInput,
uintptr_t uPosition = 0 ) const
noexcept

Locate a "C" string in a String.


Starting from uPosition (Default = 0), scan the string for a match to a "C" string and return the offset into this string where the first match was found. Return npos if there was no match.

Note
If the size of the "C" string to match is zero, it always matches.
Parameters
pInputPointer to "C" string to match.
uPositionOffset in elements of this string to begin the match.
Returns
0 to length()-1 or npos if no match.

◆ find() [4/4]

uintptr_t BURGER_API Burger::String::find ( const String & rInput,
uintptr_t uPosition = 0 ) const
noexcept

Locate a String in a String.


Starting from uPosition (Default = 0), scan this string for a match to a supplied String and return the offset into this String where the first match was found. Return npos if there was no match.

Note
Empty rInput strings always match.
Parameters
rInputReference to a String to match.
uPositionOffset in elements of the string that began the match.
Returns
0 to length()-1 or npos if no match.

◆ FormattedAllocCallback()

uint_t BURGER_API Burger::String::FormattedAllocCallback ( uint_t bError,
uintptr_t uRequestedSize,
void ** ppOutputBuffer,
void * pContext )
staticprivatenoexcept

◆ Get()

char BURGER_API Burger::String::Get ( uintptr_t uWhere) const
noexcept

Return a single character from the string.


If the index is beyond the end if the string, the function will return a zero.

Parameters
uWhereIndex to fetch a character from
Returns
Character found in the string or zero if the index is beyond the end of the string.

◆ GetBoolean()

BURGER_INLINE uint_t Burger::String::GetBoolean ( uint_t bDefault) const
inlinenoexcept

Convert an ASCII string into a boolean.


Convert the string to a TRUE or a FALSE. If the input is nullptr or invalid, return the default value.

"true" and "yes" are considered TRUE while "false" and "no" are considered FALSE. The comparison is case insensitive.

Parameters
bDefaultDefault boolean to return in the event of a parsing error.
Returns
TRUE or FALSE
See also
AsciiToBoolean(const char *,const char **) or AsciiToBoolean( const char *,uint_t)

◆ GetDouble() [1/2]

double Burger::String::GetDouble ( double dDefault) const
inlinenoexcept

Return a 64 bit floating point value.


Scan the value string as a 64 bit floating point numeric value and if successful, return it. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
dDefaultValue to return on error
Returns
Value or dDefault
See also
GetFloat(float) const, SetDouble(double) or AsciiToDouble( const char *,double)

◆ GetDouble() [2/2]

double Burger::String::GetDouble ( double dDefault,
double dMin,
double dMax ) const
inlinenoexcept

Return a 64 bit floating point value.


Scan the value string as a 64 bit floating point numeric value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
dDefaultValue to return on error
dMinMinimum acceptable value
dMaxMaximum acceptable value
Returns
Value in between dMin and dMax or dDefault
See also
GetFloat(float,float,float) const, SetDouble(double) or AsciiToDouble(const char *,double,double,double)

◆ GetFloat() [1/2]

BURGER_INLINE float Burger::String::GetFloat ( float fDefault) const
inlinenoexcept

Return a floating point value.


Scan the value string as a 32 bit floating point numeric value and if successful, return it. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
fDefaultValue to return on error
Returns
Value or fDefault
See also
GetDouble(double) const, SetFloat(float) or AsciiToFloat( const char *,float)

◆ GetFloat() [2/2]

BURGER_INLINE float Burger::String::GetFloat ( float fDefault,
float fMin,
float fMax ) const
inlinenoexcept

Return a floating point value.


Scan the value string as a 32 bit floating point numeric value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
fDefaultValue to return on error
fMinMinimum acceptable value
fMaxMaximum acceptable value
Returns
Value in between fMin and fMax or fDefault
See also
GetDouble(double,double,double) const, SetFloat(float) or AsciiToFloat(const char *,float,float,float)

◆ GetInt()

int_t Burger::String::GetInt ( int_t iDefault,
int_t iMin = (- 0x7FFFFFFF ) - 1,
int_t iMax = 0x7FFFFFFF ) const
inlinenoexcept

Return a signed integer value.


Scan the value string as a 32 bit signed integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFF will be converted to -1.

Parameters
iDefaultValue to return on error
iMinMinimum acceptable value
iMaxMaximum acceptable value
Returns
Value in between iMin and iMax or iDefault
See also
GetWord(uint_t,uint_t,uint_t) const, SetInt(int_t) or AsciiToInteger(const char *,int_t,int_t,int_t)

◆ GetWord()

BURGER_INLINE uint_t Burger::String::GetWord ( uint_t uDefault,
uint_t uMin = 0,
uint_t uMax = 0xFFFFFFFFU ) const
inlinenoexcept

Return an unsigned integer value.


Scan the value string as a 32 bit unsigned integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

Hex strings are acceptable input in the form of $1234 and 0x1234

Parameters
uDefaultValue to return on error
uMinMinimum acceptable value
uMaxMaximum acceptable value
Returns
Value in between uMin and uMax or uDefault
See also
GetInt(int_t,int_t,int_t) const, SetWord(uint_t), SetWordHex(uint_t), or AsciiToWord(const char *,uint_t,uint_t,uint_t)

◆ InitFormattedString()

void BURGER_API Burger::String::InitFormattedString ( const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
privatenoexcept

◆ insert()

Burger::eError BURGER_API Burger::String::insert ( uintptr_t uStart,
const char * pInput,
uintptr_t uLength )
noexcept

Insert a string into a current String.


If uStart is beyond the end of the string, it's placed at the end of the string.

If Text points to a "C" string that is smaller than MaxLen, then only the length of the "C" string is used

Parameters
uStartIndex to insert the new characters
pInputPointer to the string to insert
uLengthNumber of bytes to insert
Returns
Zero if no error, non-zero on memory error.

◆ IsValid()

Burger::String::IsValid ( void ) const
inlinenoexcept

Return TRUE if the string has characters.


Returns
FALSE on an empty string, TRUE if there are characters in the string

◆ Left()

Burger::String &BURGER_API Burger::String::Left ( uintptr_t uNewLength,
char iInput = ' ' )
noexcept

Resize a string and either truncate or append with a fill character.


Force the string to be a specific size. If the string grows, fill in the extra space with the pad character. Retain the preexisting string from index zero to index uNewLength

Parameters
uNewLengthNumber of bytes the string will occupy
iInputcharacter to fill the buffer with in case of growth
Returns
Reference to the Burger::String

◆ length()

Burger::String::length ( void ) const
inlinenoexcept

Return the length of the "C" string.


Returns
The length in bytes of the UTF8 "C" string

◆ Lowercase()

Burger::String::Lowercase ( void ) const
inlinenoexcept

Return a lowercase copy of the string.


Make a copy of the string with all of the ASCII uppercase characters converted to lowercase.

Returns
New instance of the string class in lower case

◆ NormalizeLineFeeds()

uintptr_t BURGER_API Burger::String::NormalizeLineFeeds ( void )
noexcept

Normalize Mac and PC line feeds to Linux/Unix format.


Find all occurrences of '\r' and '\r\n' and replace them with a single '\n' character. The string will be reduced in size if necessary.

Returns
Number of bytes of remaining string but not including the terminating zero
See also
RemoveChar(char)

◆ operator char()

Burger::String::operator char ( ) const
inlinenoexcept

Return the first character of the "C" string.


Helper to access the first character of the "C" string. It can be zero.

Returns
The first character of the "C" string

◆ operator char *()

Burger::String::operator char * ( )
inlinenoexcept

Return the pointer to the string.


Helper to access the pointer to the UTF8 ASCII string

Returns
Pointer to the UTF8 "C" string.

◆ operator const char *()

Burger::String::operator const char * ( ) const
inlinenoexcept

Return the const pointer to the string.


Helper to access the const pointer to the UTF8 ASCII string

Returns
Pointer to the const UTF8 "C" string.

◆ operator!()

Burger::String::operator! ( ) const
inlinenoexcept

Return TRUE if the string is empty.


Returns
TRUE on an empty string, FALSE if there are characters in the string

◆ operator()() [1/3]

Burger::String::operator() ( uintptr_t uInput) const
inlinenoexcept

Return the reference to a location in the string.


Given an offset into the string, return the reference to the character. If the offset exceeds the length of the string, it will be clamped to the terminating zero.

Parameters
uInputOffset to the starting character of the new string
Returns
A constant reference to the character in the string.
See also
Burger::String::operator [] (uintptr_t) const

◆ operator()() [2/3]

Burger::String::operator() ( uintptr_t uInput)
inlinenoexcept

Return the reference to a location in the string.


Given an offset into the string, return the reference to the character. If the offset exceeds the length of the string, it will be clamped to the terminating zero.

Parameters
uInputOffset to the starting character of the new string
Returns
A reference to the character in the string.
See also
Burger::String::operator [] (uintptr_t)

◆ operator()() [3/3]

Burger::String::operator() ( uintptr_t uStart,
uintptr_t uLength ) const
inlinenoexcept

Create a new Burger::String from a substring.


Given the start and end offsets of a string, create a new string with those offsets and return the resulting string

Parameters
uStartOffset to the starting character of the new string
uLengthNumber of characters to copy
Returns
A class instance of Burger::String containing the new string.
See also
Burger::String::String(const Burger::String &,uintptr_t,uintptr_t)

◆ operator+=() [1/4]

Burger::String & Burger::String::operator+= ( char iInput)
noexcept

Append a single character to the current string.


Increase the buffer if needed and append the input character to the existing string. If the input character is zero, no operation is performed.

Parameters
iInputCharacter to append, zero does nothing.
Returns
A reference to the this pointer

◆ operator+=() [2/4]

Burger::String & Burger::String::operator+= ( const char * pInput)
noexcept

Append a UTF8 "C" string to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty, no operation is performed.

Parameters
pInputPointer to a UTF8 "C" string to append. nullptr performs no operation
Returns
A reference to the this object

◆ operator+=() [3/4]

Burger::String & Burger::String::operator+= ( const String & rInput)
noexcept

Append a Burger::String to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty, no operation is performed.

Parameters
rInputReference to string to append
Returns
A reference to the this pointer

◆ operator+=() [4/4]

Burger::String & Burger::String::operator+= ( const uint16_t * pInput)
noexcept

Append a UTF16 "C" string to the current string.


Increase the buffer if needed and append the input string to the existing string. If the input string is empty, no operation is performed.

Parameters
pInputPointer to a UTF8 "C" string to append. nullptr performs no operation
Returns
A reference to the this object

◆ operator=() [1/5]

Burger::String & Burger::String::operator= ( char iInput)
noexcept

Assign a single character length string to this Burger::String.


If the input is zero, the string is empty.

Note
Since the default encoding is UFT8, input that's greater than 127 will yield a possibly invalid string due to UTF8 decoding.
Parameters
iInputSingle low ASCII character to create a string.
Returns
A reference to the this pointer

◆ operator=() [2/5]

Burger::String & Burger::String::operator= ( const char * pInput)
noexcept

Assign a "C" string to a Burger::String.


Copy the contents of a UTF8 "C" string into this Burger::String

Parameters
pInputPointer to a UTF8 "C" string. nullptr generates an empty string.
Returns
A reference to the this pointer

◆ operator=() [3/5]

Burger::String & Burger::String::operator= ( const String & rInput)
noexcept

Assign a Burger::String.


Copy the contents of a Burger::String into this Burger::String

Parameters
rInputReference to a Burger::String to copy from
Returns
A reference to the this pointer

◆ operator=() [4/5]

Burger::String & Burger::String::operator= ( const uint16_t * pInput)
noexcept

Assign a 16 bit "C" string to a Burger::String.


Copy the contents of a UTF16 "C" string into this Burger::String

Parameters
pInputPointer to a UTF16 "C" string. nullptr generates an empty string.
Returns
A reference to the this pointer

◆ operator=() [5/5]

Burger::String & Burger::String::operator= ( String && rInput)
noexcept

Copy assignment operator.


Only available on C++11 or higher.

Parameters
rInputReference to a Burger::String

◆ operator[]() [1/2]

Burger::String::operator[] ( uintptr_t uInput) const
inlinenoexcept

Return the reference to a location in the string.


Given an offset into the string, return the reference to the character. If the offset exceeds the length of the string, it will be clamped to the terminating zero.

Parameters
uInputOffset to the starting character of the new string
Returns
A constant reference to the character in the string.
See also
Burger::String::operator () (uintptr_t) const

◆ operator[]() [2/2]

Burger::String::operator[] ( uintptr_t uInput)
inlinenoexcept

Return the reference to a location in the string.


Given an offset into the string, return the reference to the character. If the offset exceeds the length of the string, it will be clamped to the terminating zero.

Parameters
uInputOffset to the starting character of the new string
Returns
A reference to the character in the string.
See also
Burger::String::operator () (uintptr_t)

◆ PCopy()

uintptr_t BURGER_API Burger::String::PCopy ( uint8_t * pOutput,
uintptr_t uOutputSize = 256 ) const
noexcept

Extract the string into a Pascal buffer of a specific size.


This will truncate the string if the buffer is too small

Note
Pascal strings have a hard limit of 256 byte (255 characters). If the buffer exceeds this length, it will be truncated
The resulting string will NOT have a terminating zero, so it must manually be converted into a "C". It is not a dual "C" string and Pascal string.
Parameters
pOutputBuffer of up a maximum of 256 bytes in length
uOutputSizeSize of the buffer in bytes. If the value is greater than 256 it will be truncated to 256.
See also
Burger::String::Copy(char *,uintptr_t) const

◆ pop_back()

char BURGER_API Burger::String::pop_back ( void )
noexcept

Remove the last character from a string.


If there is data, remove the last entry, update the length and then return the removed character. If the string is empty, zero is returned and no other action is performed.

Returns
Last character in the string, or zero if the string is empty.

◆ Printf() [1/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG1  )
inlinenoexcept

String.Printf(const char* pFmt, ....

)

◆ Printf() [2/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG10  )
inlinenoexcept

◆ Printf() [3/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG11  )
inlinenoexcept

◆ Printf() [4/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG12  )
inlinenoexcept

◆ Printf() [5/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG13  )
inlinenoexcept

◆ Printf() [6/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG14  )
inlinenoexcept

◆ Printf() [7/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG15  )
inlinenoexcept

◆ Printf() [8/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG16  )
inlinenoexcept

◆ Printf() [9/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG17  )
inlinenoexcept

◆ Printf() [10/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG18  )
inlinenoexcept

◆ Printf() [11/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG19  )
inlinenoexcept

◆ Printf() [12/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG2  )
inlinenoexcept

◆ Printf() [13/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG20  )
inlinenoexcept

◆ Printf() [14/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG21  )
inlinenoexcept

◆ Printf() [15/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG22  )
inlinenoexcept

◆ Printf() [16/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG23  )
inlinenoexcept

◆ Printf() [17/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG24  )
inlinenoexcept

◆ Printf() [18/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG3  )
inlinenoexcept

◆ Printf() [19/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG4  )
inlinenoexcept

◆ Printf() [20/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG5  )
inlinenoexcept

◆ Printf() [21/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG6  )
inlinenoexcept

◆ Printf() [22/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG7  )
inlinenoexcept

◆ Printf() [23/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG8  )
inlinenoexcept

◆ Printf() [24/48]

void Burger::String::Printf ( const char * pFmt,
BURGER_SP_ARG9  )
inlinenoexcept

◆ Printf() [25/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG1  )
inlinenoexcept

String.Printf(const String& pFmt, ....

)

◆ Printf() [26/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG10  )
inlinenoexcept

◆ Printf() [27/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG11  )
inlinenoexcept

◆ Printf() [28/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG12  )
inlinenoexcept

◆ Printf() [29/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG13  )
inlinenoexcept

◆ Printf() [30/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG14  )
inlinenoexcept

◆ Printf() [31/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG15  )
inlinenoexcept

◆ Printf() [32/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG16  )
inlinenoexcept

◆ Printf() [33/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG17  )
inlinenoexcept

◆ Printf() [34/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG18  )
inlinenoexcept

◆ Printf() [35/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG19  )
inlinenoexcept

◆ Printf() [36/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG2  )
inlinenoexcept

◆ Printf() [37/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG20  )
inlinenoexcept

◆ Printf() [38/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG21  )
inlinenoexcept

◆ Printf() [39/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG22  )
inlinenoexcept

◆ Printf() [40/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG23  )
inlinenoexcept

◆ Printf() [41/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG24  )
inlinenoexcept

◆ Printf() [42/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG3  )
inlinenoexcept

◆ Printf() [43/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG4  )
inlinenoexcept

◆ Printf() [44/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG5  )
inlinenoexcept

◆ Printf() [45/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG6  )
inlinenoexcept

◆ Printf() [46/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG7  )
inlinenoexcept

◆ Printf() [47/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG8  )
inlinenoexcept

◆ Printf() [48/48]

void Burger::String::Printf ( const String & sFmt,
BURGER_SP_ARG9  )
inlinenoexcept

◆ push_back()

Burger::eError Burger::String::push_back ( char iInput)
noexcept

Append a single character to the current string.


Increase the buffer if needed and append the input character to the existing string. If the input character is zero, no operation is performed.

Parameters
iInputCharacter to append, zero does nothing.
Returns
Zero if no error, non-zero on memory error.

◆ Put()

void BURGER_API Burger::String::Put ( uintptr_t uWhere,
char cInput )
noexcept

Modify a single character in the string.


Note
This function will NOT increase the size of the string.
Parameters
uWhereOffset into the string to write to.
cInputCharacter to update the string with.

◆ Remove()

uintptr_t BURGER_API Burger::String::Remove ( uintptr_t uStart,
uintptr_t uLength = UINTPTR_MAX )
noexcept

Remove a part of the string.


This routine will not resize the buffer

Parameters
uStartStarting index into the string for the section to remove
uLengthNumber of bytes to remove from the string
Returns
Number of bytes of remaining string but not including the terminating zero

◆ RemoveChar()

uintptr_t BURGER_API Burger::String::RemoveChar ( char iInput)
noexcept

Remove a specific character from the string.


Find all occurrences of the character and remove them. The string will be reduced in size if necessary.

Parameters
iInputCharacter to remove from the string. Zero will perform no action
Returns
Number of bytes of remaining string but not including the terminating zero
See also
RemoveChars(const char *)

◆ RemoveChars()

uintptr_t BURGER_API Burger::String::RemoveChars ( const char * pInput)
noexcept

Remove each and every char in the list.


Given a string containing characters, remove the characters found from the current string. Duplicating characters in the input string will reduce performance slightly. The order of the characters is not important.

Parameters
pInputPointer to a "C" string containing the characters to remove. nullptr performs no action
Returns
Number of bytes of remaining string but not including the terminating zero
See also
RemoveChar(char)

◆ reserve()

Burger::eError BURGER_API Burger::String::reserve ( uintptr_t uNewBufferSize)
noexcept

Ensure a minimum buffer size.


Set the buffer to at least a specific size while retaining the existing string. If the preexisting buffer is not large enough, it will be grown to accomodate the new buffer. The buffer size will be padded to reserve one byte for the terminating zero.

If the buffer is already large enough to satisfy this request, no operation will be performed.

Note
If a buffer of 100 bytes is requested, 101 bytes will be allocated to hold a string up to 100 characters in length with the 101st byte being the terminating zero. The output of Burger::StringLength() is acceptable as input for a new string.
Parameters
uNewBufferSizeNumber of bytes to set the buffer to
Returns
Zero if no error, error code if the buffer couldn't be resized

◆ resize()

Burger::eError BURGER_API Burger::String::resize ( uintptr_t uSize)
noexcept

Force a buffer size.


Set the buffer to a specific size while retaining the existing string. If the preexisting string is too long for the new buffer, it will be truncated. The buffer size will be padded to reserve one byte for the terminating zero.

Note
If a buffer of 100 bytes is requested, 101 bytes will be allocated to hold a string up to 100 characters in length with the 101st byte being the terminating zero. The output of Burger::StringLength() is acceptable as input for a new string.
Parameters
uSizeNumber of bytes to set the buffer to
Returns
Zero if no error, error code if the buffer couldn't be resized

◆ Right()

Burger::String &BURGER_API Burger::String::Right ( uintptr_t uNewLength,
char iInput = ' ' )
noexcept

Resize a string and either truncate or prepend with a fill character.


Force the string to be a specific size. If the string grows, fill in the extra space with the pad character. Note: I am padding the string from the "left" side. I.E. the string is moved to the right.

Parameters
uNewLengthNumber of bytes the string will occupy
iInputcharacter to fill the buffer with in case of growth
Returns
Reference to the Burger::String

◆ SetDouble()

void BURGER_API Burger::String::SetDouble ( double dValue)
noexcept

Set a 64 bit floating point value.


Convert the input into an floating point representation of a UTF-8 string and set the value to this string

Parameters
dValueValue to store as a 64 bit floating point string
See also
GetDouble(double,double,double) const or SetFloat(float)

◆ SetFloat()

void BURGER_API Burger::String::SetFloat ( float fValue)
noexcept

Set a 32 bit floating point value.


Convert the input into an floating point representation of a UTF-8 string and set the value to this string

Parameters
fValueValue to store as a floating point string
See also
GetFloat(float,float,float) const or SetDouble(double)

◆ SetInt()

void BURGER_API Burger::String::SetInt ( int_t iInput)
noexcept

Set a signed integer value.


Convert the input into an signed integer UTF-8 string and set the value to this string

Parameters
iInputValue to store as a signed integer string
See also
GetInt(int_t,int_t,int_t) const or SetWord(uint_t)

◆ SetTrueFalse()

void BURGER_API Burger::String::SetTrueFalse ( uint_t bInput)
noexcept

Set the string to "true" or "false".


If the input value is zero, set the string to "false", otherwise set the string to "true".

Parameters
bInputValue to store as a string
See also
GetBoolean(uint_t) const or SetYesNo(uint_t)

◆ SetWord()

void BURGER_API Burger::String::SetWord ( uint_t uInput)
noexcept

Set an unsigned integer value.


Convert the input into an unsigned integer UTF-8 string and set the value to this string

Parameters
uInputValue to store as an unsigned integer string
See also
GetWord(uint_t,uint_t,uint_t) const or SetWordHex(uint_t)

◆ SetWordHex()

void BURGER_API Burger::String::SetWordHex ( uint_t uValue)
noexcept

Set an unsigned integer value as hex.


Convert the input into a "C" style hex string in the format of 0x12345678 and store this string as the value

Parameters
uValueValue to store as an unsigned integer hex string
See also
GetWord(uint_t,uint_t,uint_t) const or SetWord(uint_t)

◆ SetYesNo()

void BURGER_API Burger::String::SetYesNo ( uint_t bInput)
noexcept

Set the string to "true" or "false".


If the input value is zero, set the string to "false", otherwise set the string to "true".

Parameters
bInputValue to store as a string
See also
GetBoolean(uint_t) const or SetTrueFalse(uint_t)

◆ size()

Burger::String::size ( void ) const
inlinenoexcept

Return the length of the "C" string.


Returns
The length in bytes of the UTF8 "C" string

◆ starts_with() [1/3]

uint_t BURGER_API Burger::String::starts_with ( char iInput)
noexcept

Test if the string starts with a char.


If the string is not empty, test the first character for a match and return TRUE if so. Always return FALSE if the string is empty.

Note
Test is case sensitive.
Parameters
iInputCharacter to match
Returns
TRUE if a match, FALSE if not.
See also
ends_with(char)

◆ starts_with() [2/3]

uint_t BURGER_API Burger::String::starts_with ( const char * pInput)
noexcept

Test if the string starts with a "C" string.


If the string is not empty, test the input "C" string for a match and return TRUE if so. Always return FALSE if the string is empty. If the input string is empty, always return FALSE.

Note
Test is case sensitive.
Parameters
pInput"C" string to match. nullptr will return FALSE
Returns
TRUE if a match, FALSE if not.
See also
ends_with(const char *)

◆ starts_with() [3/3]

uint_t BURGER_API Burger::String::starts_with ( const char * pInput,
uintptr_t uLength )
noexcept

Test if the string starts with a buffer of data.


If the string is not empty, test the input buffer for a match and return TRUE if so. Always return FALSE if the string is empty. If the input buffer is empty, always return FALSE.

Note
Test is case sensitive.
Parameters
pInputText buffer to match.
uLengthLength of the text buffer. Zero will always return FALSE
Returns
TRUE if a match, FALSE if not.
See also
ends_with(const char *, uintptr_t)

◆ ToLowercase()

Burger::String::ToLowercase ( void )
inlinenoexcept

Convert the string to lower case.


Convert all ASCII uppercase characters to lowercase.

Returns
Reference to the string class

◆ ToUppercase()

Burger::String::ToUppercase ( void )
inlinenoexcept

Convert the string to upper case.


Convert all ASCII lowercase characters to uppercase.

Returns
Reference to the string class

◆ Uppercase()

Burger::String::Uppercase ( void ) const
inlinenoexcept

Return an uppercase copy of the string.


Make a copy of the string with all of the ASCII lowercase characters converted to uppercase.

Returns
New instance of the string class in upper case

Friends And Related Symbol Documentation

◆ operator!= [1/5]

Burger::String::operator!= ( char cInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the strings are not equal (Case sensitive)


Parameters
cInput1Single character as a string to test
rInput2Burger::String to test against
Returns
TRUE if the strings are not equal

◆ operator!= [2/5]

Burger::String::operator!= ( const char * pInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the strings are not equal (Case sensitive)


Parameters
pInput1Pointer to "C" string to test
rInput2Burger::String to test against
Returns
TRUE if the strings are not equal

◆ operator!= [3/5]

Burger::String::operator!= ( Burger::String const & rInput1,
char cInput2 )
friend

Return TRUE if the strings are not equal (Case sensitive)


Parameters
rInput1Burger::String to test
cInput2Single character as a string to test against
Returns
TRUE if the strings are not equal

◆ operator!= [4/5]

Burger::String::operator!= ( Burger::String const & rInput1,
const char * pInput2 )
friend

Return TRUE if the strings are not equal (Case sensitive)


Parameters
rInput1Burger::String to test
pInput2Pointer to "C" string to test against
Returns
TRUE if the strings are not equal

◆ operator!= [5/5]

Return TRUE if the strings are not equal (Case sensitive)


Parameters
rInput1Burger::String to test
rInput2Burger::String to test against
Returns
TRUE if the strings are not equal

◆ operator< [1/5]

Burger::String::operator< ( char cInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is less than the second (Case sensitive)


Parameters
cInput1Single character as a string to test
rInput2Burger::String to test against
Returns
TRUE if the first is less than the second

◆ operator< [2/5]

Burger::String::operator< ( const char * pInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is less than the second (Case sensitive)


Parameters
pInput1Pointer to "C" string to test
rInput2Burger::String to test against
Returns
TRUE if the first is less than the second

◆ operator< [3/5]

Burger::String::operator< ( Burger::String const & rInput1,
char cInput2 )
friend

Return TRUE if the first is less than the second (Case sensitive)


Parameters
rInput1Burger::String to test
cInput2Single character as a string to test against
Returns
TRUE if the first is less than the second

◆ operator< [4/5]

Burger::String::operator< ( Burger::String const & rInput1,
const char * pInput2 )
friend

Return TRUE if the first is less than the second (Case sensitive)


Parameters
rInput1Burger::String to test
pInput2Pointer to "C" string to test against
Returns
TRUE if the first is less than the second

◆ operator< [5/5]

Burger::String::operator< ( Burger::String const & rInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is less than the second (Case sensitive)


Parameters
rInput1Burger::String to test
rInput2Burger::String to test against
Returns
TRUE if the first is less than the second

◆ operator<= [1/5]

Burger::String::operator<= ( char cInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is less than or equal to the second (Case sensitive)

Parameters
cInput1Single character as a string to test
rInput2Burger::String to test against
Returns
TRUE if the first is less than or equal to the second

◆ operator<= [2/5]

Burger::String::operator<= ( const char * pInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is less than or equal to the second (Case sensitive)


Parameters
pInput1Pointer to "C" string to test
rInput2Burger::String to test against
Returns
TRUE if the first is less than or equal to the second

◆ operator<= [3/5]

Burger::String::operator<= ( Burger::String const & rInput1,
char cInput2 )
friend

Return TRUE if the first is less than or equal to the second (Case sensitive)


Parameters
rInput1Burger::String to test
cInput2Single character as a string to test against
Returns
TRUE if the first is less than or equal to the second

◆ operator<= [4/5]

Burger::String::operator<= ( Burger::String const & rInput1,
const char * pInput2 )
friend

Return TRUE if the first is less than or equal to the second (Case sensitive)


Parameters
rInput1Burger::String to test
pInput2Pointer to "C" string to test against
Returns
TRUE if the first is less than or equal to the second

◆ operator<= [5/5]

Burger::String::operator<= ( Burger::String const & rInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is less than or equal to the second (Case sensitive)


Parameters
rInput1Burger::String to test
rInput2Burger::String to test against
Returns
TRUE if the first is less than or equal to the second

◆ operator== [1/5]

Burger::String::operator== ( char cInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the strings are equal (Case sensitive)


Parameters
cInput1Single character as a string to test
rInput2Burger::String to test against
Returns
TRUE if the strings are equal

◆ operator== [2/5]

Burger::String::operator== ( const char * pInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the strings are equal (Case sensitive)


Parameters
pInput1Pointer to "C" string to test
rInput2Burger::String to test against
Returns
TRUE if the strings are equal

◆ operator== [3/5]

Burger::String::operator== ( Burger::String const & rInput1,
char cInput2 )
friend

Return TRUE if the strings are equal (Case sensitive)


Parameters
rInput1Burger::String to test
cInput2Single character as a string to test against
Returns
TRUE if the strings are equal

◆ operator== [4/5]

Burger::String::operator== ( Burger::String const & rInput1,
const char * pInput2 )
friend

Return TRUE if the strings are equal (Case sensitive)


Parameters
rInput1Burger::String to test
pInput2Pointer to "C" string to test against
Returns
TRUE if the strings are equal

◆ operator== [5/5]

Burger::String::operator== ( Burger::String const & rInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the strings are equal (Case sensitive)


Parameters
rInput1Burger::String to test
rInput2Burger::String to test against
Returns
TRUE if the strings are equal

◆ operator> [1/5]

Burger::String::operator> ( char cInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is greater than the second (Case sensitive)


Parameters
cInput1Single character as a string to test
rInput2Burger::String to test against
Returns
TRUE if the first is greater than the second

◆ operator> [2/5]

Burger::String::operator> ( const char * pInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is greater than the second (Case sensitive)


Parameters
pInput1Pointer to "C" string to test
rInput2Burger::String to test against
Returns
TRUE if the first is greater than the second

◆ operator> [3/5]

Burger::String::operator> ( Burger::String const & rInput1,
char cInput2 )
friend

Return TRUE if the first is greater than the second (Case sensitive)


Parameters
rInput1Burger::String to test
cInput2Single character as a string to test against
Returns
TRUE if the first is greater than the second

◆ operator> [4/5]

Burger::String::operator> ( Burger::String const & rInput1,
const char * pInput2 )
friend

Return TRUE if the first is greater than the second (Case sensitive)


Parameters
rInput1Burger::String to test
pInput2Pointer to "C" string to test against
Returns
TRUE if the first is greater than the second

◆ operator> [5/5]

Burger::String::operator> ( Burger::String const & rInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is greater than the second (Case sensitive)


Parameters
rInput1Burger::String to test
rInput2Burger::String to test against
Returns
TRUE if the first is greater than the second

◆ operator>= [1/5]

Burger::String::operator>= ( char cInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is greater than or equal to the second (Case sensitive)


Parameters
cInput1Single character as a string to test
rInput2Burger::String to test against
Returns
TRUE if the first is greater than or equal to the second

◆ operator>= [2/5]

Burger::String::operator>= ( const char * pInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is greater than or equal to the second (Case sensitive)


Parameters
pInput1Pointer to "C" string to test
rInput2Burger::String to test against
Returns
TRUE if the first is greater than or equal to the second

◆ operator>= [3/5]

Burger::String::operator>= ( Burger::String const & rInput1,
char cInput2 )
friend

Return TRUE if the first is greater than or equal to the second (Case sensitive)


Parameters
rInput1Burger::String to test
cInput2Single character as a string to test against
Returns
TRUE if the first is greater than or equal to the second

◆ operator>= [4/5]

Burger::String::operator>= ( Burger::String const & rInput1,
const char * pInput2 )
friend

Return TRUE if the first is greater than or equal to the second (Case sensitive)


Parameters
rInput1Burger::String to test
pInput2Pointer to "C" string to test against
Returns
TRUE if the first is greater than or equal to the second

◆ operator>= [5/5]

Burger::String::operator>= ( Burger::String const & rInput1,
Burger::String const & rInput2 )
friend

Return TRUE if the first is greater than or equal to the second (Case sensitive)


Parameters
rInput1Burger::String to test
rInput2Burger::String to test against
Returns
TRUE if the first is greater than or equal to the second

Member Data Documentation

◆ kBufferSize

const uint_t Burger::String::kBufferSize
static
Initial value:
= static_cast<uint_t>(
96 - (sizeof(char*) + sizeof(uintptr_t) + sizeof(uintptr_t)))
unsigned int uint_t
Unsigned integer.
Definition burger.h:1513

Ensures the structure is 96 bytes in size on all platforms.

◆ m_pData

char* Burger::String::m_pData
protected

Pointer to the string.

◆ m_Raw

char Burger::String::m_Raw[kBufferSize]
protected

Temp preallocated buffer for most strings.

◆ m_uBufferSize

uintptr_t Burger::String::m_uBufferSize
protected

Size of the buffer, minimum kBufferSize.

◆ m_uLength

uintptr_t Burger::String::m_uLength
protected

Length of the string.

◆ npos

const uintptr_t Burger::String::npos = UINTPTR_MAX
static

Value returned when find() doesn't return a match.