EHS
|
#include <Str.h>
Public Member Functions | |
~Str () | |
Frees any data created on the heap. More... | |
Str () | |
Default members initialization. More... | |
Str (const T *const str, const N size) | |
Str (const T *const str) | |
Str (const N size) | |
Str (Str &&str) noexcept | |
A move constructor. More... | |
Str (const Str &str) | |
Str & | operator= (Str &&str) noexcept |
Str & | operator= (const Str &str) |
Str< T, N > & | operator= (const T *const str) |
Str< T, N > & | operator+= (const T *const str) |
Str< T, N > & | operator+= (const Str< T, N > &str) |
Str< T, N > & | operator+= (const SInt_64 num) |
Str< T, N > & | operator+= (const UInt_64 num) |
Str< T, N > & | operator+= (const SInt_32 num) |
Str< T, N > & | operator+= (const UInt_32 num) |
Str< T, N > & | operator+= (const SInt_16 num) |
Str< T, N > & | operator+= (const UInt_16 num) |
Str< T, N > & | operator+= (const SInt_8 num) |
Str< T, N > & | operator+= (const UInt_8 num) |
Str< T, N > & | operator+= (const float num) |
Str< T, N > & | operator+= (const double num) |
Str< T, N > & | operator+= (const long double num) |
Str< T, N > | operator+ (const T *const str) const |
Str< T, N > | operator+ (const Str< T, N > &str) const |
Str< T, N > | operator+ (const SInt_64 num) const |
Str< T, N > | operator+ (const UInt_64 num) const |
Str< T, N > | operator+ (const SInt_32 num) const |
Str< T, N > | operator+ (const UInt_32 num) const |
Str< T, N > | operator+ (const SInt_16 num) const |
Str< T, N > | operator+ (const UInt_16 num) const |
Str< T, N > | operator+ (const SInt_8 num) const |
Str< T, N > | operator+ (const UInt_8 num) const |
Str< T, N > | operator+ (const float num) const |
Str< T, N > | operator+ (const double num) const |
Str< T, N > | operator+ (const long double num) const |
bool | operator== (T *str) const |
bool | operator== (const T *const str) const |
bool | operator== (const Str< T, N > &str) const |
bool | operator!= (const T *const str) const |
bool | operator!= (const Str< T, N > &str) const |
operator T* () const | |
Retrieves the raw C-style string from casting a string object. More... | |
void | Resize (const N newSize) |
N | Size (bool inBytes=false) const |
void | ExactSize () |
Finds the null terminator in the string and makes it the exact size if greater than. More... | |
void | Copy (const N dstOffset, const Str< T, N > &src) |
void | Copy (const N dstOffset, const T *const src) |
void | Copy (const N dstOffset, const T *const src, const N srcSize) |
void | Insert (const N index, const Str &value) |
void | Insert (const N index, const T value) |
Str | Remove (const N start, const N end) |
T | Remove (const N index) |
void | Push (const Str< T, N > &value) |
void | Push (const T *const value, const N size) |
void | Push (const T *const value) |
void | Push (const T value) |
T | Pop () |
const Byte * | ToBytes () const |
Byte * | ToBytes () |
void | ToLower () |
Converts all upper-case ASCII characters to lower-case. More... | |
Str< T, N > | GetLower () const |
void | ToUpper () |
Converts all lower-case ASCII characters to upper-case. More... | |
Str< T, N > | GetUpper () const |
void | Reverse () |
Reverses the entire string object. More... | |
Str< T, N > | GetReverse () |
Str< T, N > | Sub (const N index, const N size=0) const |
Vector< Str< T, N >, N > | Split (const Str< T, N > &ide, const N max=0) const |
Str< T, N > | RemoveAll (const Str< T, N > &ide) const |
Str | ReplaceAll (const Str &ide, const Str &replacer) const |
bool | Find (const Str< T, N > &ide, N *const index=nullptr, const SearchPattern pattern=SearchPattern::LEFT_RIGHT, const IndexResult result=IndexResult::BEGINNING) const |
bool | Contains (const Str< T, N > &ide, const SearchPattern pattern=SearchPattern::LEFT_RIGHT) const |
bool | IsNum () const |
template<typename I = int> | |
I | HexToNum () const |
template<typename I = N> | |
I | ToDecimal () const |
float | ToFloat () const |
double | ToDouble () const |
long double | ToLDouble () const |
UInt_32 | Hash_32 () const |
UInt_64 | Hash_64 () const |
Static Public Member Functions | |
template<typename I = int> | |
static Str | NumToHex (const I num) |
template<typename I = int> | |
static I | HexToNum (const Str &in) |
static Str< T, N > | FromNum (const SInt_64 num) |
static Str< T, N > | FromNum (const UInt_64 num) |
static Str< T, N > | FromNum (const SInt_32 num) |
static Str< T, N > | FromNum (const UInt_32 num) |
static Str< T, N > | FromNum (const SInt_16 num) |
static Str< T, N > | FromNum (const UInt_16 num) |
static Str< T, N > | FromNum (const SInt_8 num) |
static Str< T, N > | FromNum (const UInt_8 num) |
static Str< T, N > | FromNum (const float num, const UInt_8 maxDecimals=5) |
static Str< T, N > | FromNum (const double num, const UInt_8 maxDecimals=5) |
static Str< T, N > | FromNum (const long double num, const UInt_8 maxDecimals=5) |
static UInt_32 | Hash_32 (const Str< T, N > &str) |
static UInt_64 | Hash_64 (const Str< T, N > &str) |
static N | Len (const T *const str) |
static bool | Cmp (const T *const a, const T *const b) |
A helper class for C-style strings.
T | The character's data type to use. |
N | The number data type to use. |
Frees any data created on the heap.
|
inline |
Default members initialization.
|
inline |
Initializes members with given C-style string.
[in] | str | The C-style string. |
[in] | size | The size of the given C-style string. |
|
inline |
Initializes members with given C-style string.
[in] | str | The C-style string. |
|
inline |
Initializes string with the given size.
[in] | size | The size. |
|
inlinenoexcept |
A move constructor.
|
inline |
Copies all members from the given string object.
[in] | str | The string object to copy from. |
|
inlinestatic |
Compares two C-style string with each other.
[in] | a | The first C-style string to compare. |
[in] | b | The second C-style string to compare. |
|
inline |
Checks if the current string contains the given ide.
[in] | ide | The given ide to check for. |
[in] | pattern | The search pattern to use. |
|
inline |
Copies a string object to the referenced string object.
dstOffset | The offset index to copy to. |
src | The source string object to copy from. |
|
inline |
Copies a C-style string to the referenced string object.
dstOffset | The offset index to copy to. |
src | The source C-style string to copy from. |
|
inline |
Copies a C-style string to the referenced string object.
dstOffset | The offset index to copy to. |
src | The source C-style string to copy from. |
srcSize | The size of the source C-style string. |
|
inline |
Finds the null terminator in the string and makes it the exact size if greater than.
|
inline |
Finds the first instance of the given string object.
[in] | ide | The string to look for. |
[out] | index | The index of the string found. Can be a nullptr. |
[in] | pattern | The search pattern for optimization. |
[in] | result | What index to return where the first instance is found. |
|
inlinestatic |
Converts the given double floating point into a string.
[in] | num | The given double floating point to convert. |
[in] | maxDecimals | The max decimal places to add. |
|
inlinestatic |
Converts the given floating point into a string.
[in] | num | The given floating point to convert. |
[in] | maxDecimals | The max decimal places to add. |
|
inlinestatic |
Converts the given long double floating point into a string.
[in] | num | The given long double floating point to convert. |
[in] | maxDecimals | The max decimal places to add. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inlinestatic |
Converts the given number into a string.
[in] | num | The given number to convert. |
|
inline |
Converts all upper-case ASCII characters to lower-case.
|
inline |
Reverses the entire string object.
|
inline |
Converts all lower-case ASCII characters to upper-case.
|
inline |
A 32-bit FNV-1a hash algorithm.
|
inlinestatic |
A 32-bit FNV-1a hash algorithm.
[in] | str | The string to hash. |
|
inline |
A 64-bit FNV-1a hash algorithm.
|
inlinestatic |
A 64-bit FNV-1a hash algorithm.
[in] | str | The string to hash. |
|
inline |
Converts the current string from hexadecimal into a number.
I | The data type of the number outputted. |
|
inlinestatic |
Converts a string hexadecimal into a number.
I | The data type of the number outputted. |
[in] | in | The string to convert. |
|
inline |
Inserts a string at a specified index.
[in] | index | The index to insert the string at. |
[in] | value | The string to insert. |
|
inline |
Inserts a character at a specified index.
[in] | index | The index to insert the character at. |
[in] | value | The character to insert. |
|
inline |
Checks if the string represents a number. Must not have any alphabetical characters.
|
inlinestatic |
Calculates the length of a C-Style string.
[in] | str | The C-Style string to calculate. |
|
inlinestatic |
Converts a number into hexadecimal string representation.
I | The data type of the number given. |
[in] | num | The number to convert. |
|
inline |
Retrieves the raw C-style string from casting a string object.
|
inline |
Compares with a string object. First comparing sizes.
[in] | str | The string to compare with. |
|
inline |
Compares with a C-style string. First comparing sizes.
[in] | str | The C-style string to compare with. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given string object.
[in] | str | The given string object. |
|
inline |
Concatenates with the given C-style string.
[in] | str | The given C-style string. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to Concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given string object.
[in] | str | The given string object. |
|
inline |
Concatenates with the given C-style string.
[in] | str | The given C-style string. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Concatenates with the given number.
[in] | num | The given number to concatenate. |
|
inline |
Copies all members from the given string object.
[in] | str | The string object to copy from. |
|
inline |
Copies the given C-style string and retrieves the size.
[in] | str | The C-style string to copy from. |
|
inlinenoexcept |
|
inline |
Compares with a string object. First comparing sizes.
[in] | str | The string object to compare with. |
|
inline |
Compares with a C-style string. First comparing sizes.
[in] | str | The C-style string to compare with. |
|
inline |
Compares with a another string. First comparing sizes.
[in] | str | The string object to compare with. |
|
inline |
Removes the value at the end of the array.
|
inline |
Adds a value at the end of the string.
[in] | value | The character to push to the end of the string. |
|
inline |
Adds a value at the end of the string.
[in] | value | The C-style string to push to the end of the string. |
|
inline |
Adds a value at the end of the string.
[in] | value | The C-style string to push to the end of the string. |
[in] | size | The size of the given C-style string. |
|
inline |
Adds a value at the end of the string.
[in] | value | The character to push to the end of the string. |
|
inline |
Removes a character at the given index.
[in] | index | The index to remove a character. |
|
inline |
Removes characters withing the given range.
[in] | start | The index to start. |
[in] | end | The index to end. |
|
inline |
Removes all instances of the ide.
[in] | ide | The string to look for. |
|
inline |
Replaces all instances of ide with the replacer.
[in] | ide | The string to look for. |
[in] | replacer | The string placed. |
|
inline |
Resizes the string.
[in] | newSize | The size to change to. |
|
inline |
Reverses the entire string object.
|
inline |
Retrieves the size of the string.
[in] | inBytes | To retrieve the size in bytes. |
|
inline |
Splits a string into a Vector with the given separator.
[in] | ide | The given string as the separator. |
[in] | max | The max amount of times to split the string. |
|
inline |
Clips the string at the given index and with the given size.
[in] | index | The index to clip at. |
[in] | size | The size for the clip starting from the index. |
Retrieves the string in bytes for serialization.
|
inline |
Retrieves the string in bytes for serialization.
|
inline |
Converts the string into a number.
I | The resulting number's data type. |
|
inline |
Converts the string into a double floating point number.
|
inline |
Converts the string into a floating point number.
|
inline |
Converts the string into a long double floating point number.
|
inline |
Converts all upper-case ASCII characters to lower-case.
|
inline |
Converts all lower-case ASCII characters to upper-case.