|
Devel Lib
|
A class for representing and manipulating a character array. More...
#include <CharArray.h>
Public Member Functions | |
| CCharArray () | |
| Default constructor. | |
| CCharArray (const char *i_szString) | |
| Explicit constructor. More... | |
| CCharArray (const std::string &i_sString) | |
| Explicit constructor. More... | |
| CCharArray (std::initializer_list< char > i_oList) | |
| Initializer list constructor. More... | |
| CCharArray (const CCharArray< Size > &i_szString) | |
| Copy constructor. More... | |
| template<size_t TOtherSize> | |
| CCharArray (const CCharArray< TOtherSize > &i_szString) | |
| Copy constructor. More... | |
| ~CCharArray ()=default | |
| Default destructor. | |
| void | set (const std::string &i_sString) |
| Set char array data from string. More... | |
| void | set (const char *i_szString, size_t i_nSize) |
| Set char array data from char pointer. More... | |
| void | set (const char *i_szString) |
| Set char array data from char pointer. More... | |
| void | set (const CCharArray< Size > &i_szString) |
| Set char array data from other CCharArray. More... | |
| template<size_t SizeOther> | |
| void | set (const CCharArray< SizeOther > &i_szString) |
| Set char array data from other CCharArray. More... | |
| char * | begin () |
| const char * | begin () const |
| char * | end () |
| const char * | end () const |
| const char * | c_str () const |
| size_t | length () const |
| char & | first () |
| const char & | first () const |
| char & | last () |
| const char & | last () const |
| char & | at (const size_t i_nIndex) |
| const char & | at (const size_t i_nIndex) const |
| std::string | toStdString () const |
| CCharArray< Size > & | operator= (const CCharArray< Size > &i_szString) |
| Assigns the contents of another CCharArray to this object. More... | |
| template<size_t TOtherSize> | |
| CCharArray< Size > & | operator= (const CCharArray< TOtherSize > &i_szString) |
| Assigns the contents of another CCharArray to this object. More... | |
| CCharArray< Size > & | operator= (const std::string &i_sString) |
| Assigns the contents of a standard string to this object. More... | |
| CCharArray< Size > & | operator= (const char *i_szString) |
| Assigns the contents of a char array to this object. More... | |
| bool | operator== (const CCharArray< Size > &i_szString) const |
| Compare CCharArray object with another for equality. More... | |
| template<size_t SizeOther> | |
| bool | operator== (const CCharArray< SizeOther > &i_szString) const |
| Compare CCharArray object with another for equality. More... | |
| bool | operator== (const char *i_szString) const |
| Compare CCharArray object with a char array for equality. More... | |
| bool | operator== (const std::string &i_sString) const |
| Compare CCharArray object with a standard string for equality. More... | |
| bool | operator!= (const CCharArray< Size > &i_szString) const |
| Compare CCharArray object with another for inequality. More... | |
| template<size_t SizeOther> | |
| bool | operator!= (const CCharArray< SizeOther > &i_szString) const |
| Compare CCharArray object with another for inequality. More... | |
| bool | operator!= (const char *i_szString) const |
| Compare CCharArray object with a char array for inequality. More... | |
| bool | operator!= (const std::string &i_sString) const |
| Compare CCharArray object with a standard string for inequality. More... | |
| operator char * () | |
| Implicit conversion to a char array. | |
| operator const char * () const | |
| Implicit conversion to a const char array. | |
Static Public Member Functions | |
| static constexpr size_t | maxLength () |
A class for representing and manipulating a character array.
This class encapsulates character arrays by providing constructors, assignment operators, and string manipulation functionalities.
Example
This class must be used with the template type being the size of the array you are working with.
|
inlineexplicit |
Explicit constructor.
| i_szString | The char pointer to copy |
|
inlineexplicit |
Explicit constructor.
| i_sString | The string to copy |
|
inline |
Initializer list constructor.
| i_oList | initializer list |
|
inline |
Copy constructor.
| i_szString | The char array to copy |
|
inlineexplicit |
Copy constructor.
| i_szString | The char array to copy |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticconstexpr |
|
inline |
Compare CCharArray object with another for inequality.
| i_szString | The CCharArray to compare |
|
inline |
Compare CCharArray object with another for inequality.
| i_szString | The CCharArray to compare |
|
inline |
Compare CCharArray object with a char array for inequality.
| i_szString | The char array to compare |
|
inline |
Compare CCharArray object with a standard string for inequality.
| i_sString | The string to compare |
|
inline |
Assigns the contents of another CCharArray to this object.
| i_szString | The CCharArray to copy |
|
inline |
Assigns the contents of another CCharArray to this object.
| i_szString | The CCharArray to copy |
|
inline |
Assigns the contents of a char array to this object.
| i_szString | The char array to copy |
|
inline |
Assigns the contents of a standard string to this object.
| i_sString | The string to copy |
|
inline |
Compare CCharArray object with another for equality.
| i_szString | The CCharArray to compare |
|
inline |
Compare CCharArray object with another for equality.
| i_szString | The CCharArray to compare |
|
inline |
Compare CCharArray object with a char array for equality.
| i_szString | The char array to compare |
|
inline |
Compare CCharArray object with a standard string for equality.
| i_sString | The string to compare |
|
inline |
Set char array data from other CCharArray.
| i_szString | The CCharArray to set |
|
inline |
Set char array data from other CCharArray.
| i_szString | The CCharArray to set |
|
inline |
Set char array data from char pointer.
| i_szString | The string to set |
|
inline |
Set char array data from char pointer.
| i_szString | The string to set |
| i_nSize | The size of the string |
|
inline |
Set char array data from string.
| i_sString | The string to set |
|
inline |