StringSumHelper Class Reference

#include <WString.h>

Inheritance diagram for StringSumHelper:
Collaboration diagram for StringSumHelper:

Public Member Functions

 StringSumHelper (const String &s)
 
 StringSumHelper (const char *p)
 
 StringSumHelper (char c)
 
 StringSumHelper (unsigned char num)
 
 StringSumHelper (int num)
 
 StringSumHelper (unsigned int num)
 
 StringSumHelper (long num)
 
 StringSumHelper (long long num)
 
 StringSumHelper (unsigned long num)
 
 StringSumHelper (unsigned long long num)
 
 StringSumHelper (float num)
 
 StringSumHelper (double num)
 
- Public Member Functions inherited from String
 String ()
 Default constructor. More...
 
 ~String (void)
 
void setString (const char *cstr)
 
void setString (const char *cstr, size_t length)
 
void setString (flash_string_t pstr)
 
void setString (flash_string_t pstr, size_t length)
 
bool reserve (size_t size)
 Pre-allocate String memory. More...
 
bool setLength (size_t length)
 set the string length accordingly, expanding if necessary More...
 
size_t length (void) const
 Obtain the String length in characters, excluding NUL terminator. More...
 
bool setBuffer (const Buffer &buffer)
 Set String content using move semantics from external memory buffer. More...
 
Buffer getBuffer ()
 Get String content using move semantics. More...
 
 operator StringIfHelperType () const
 Provides safe bool() operator. More...
 
bool startsWith (const String &prefix) const
 Compare the start of a String Comparison is case-sensitive, must match exactly. More...
 
bool startsWith (const String &prefix, size_t offset) const
 Compare a string portion. More...
 
bool endsWith (char suffix) const
 Compare the end of a String. More...
 
bool endsWith (const String &suffix) const
 Compare the end of a String. More...
 
char charAt (size_t index) const
 Obtain the character at the given index. More...
 
void setCharAt (size_t index, char c)
 Sets the character at a given index. More...
 
size_t getBytes (unsigned char *buf, size_t bufsize, size_t index=0) const
 Read contents of a String into a buffer. More...
 
void toCharArray (char *buf, size_t bufsize, size_t index=0) const
 Read contents of String into a buffer. More...
 
const char * c_str () const
 Get a constant (un-modifiable) pointer to String content. More...
 
char * begin ()
 Get a modifiable pointer to String content. More...
 
char * end ()
 Get a modifiable pointer to one-past the end of the String. More...
 
const char * begin () const
 
const char * end () const
 
void toLowerCase (void)
 Convert the entire String content to lower case. More...
 
void toUpperCase (void)
 Convert the entire String content to upper case. More...
 
void trim (const char *set=" \t\n\v\f\r")
 Remove all leading and trailing characters from the String. More...
 
long toInt (void) const
 
float toFloat (void) const
 
 String (const char *cstr)
 
 String (const char *cstr, size_t length)
 
 String (const String &str)
 
 String (flash_string_t pstr, size_t length)
 
 String (flash_string_t pstr)
 
 String (String &&rval) noexcept
 
 String (StringSumHelper &&rval) noexcept
 
 String (char c)
 
 String (unsigned char, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (int num, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (unsigned int num, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (long, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (long long, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (unsigned long, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (unsigned long long, unsigned char base=10, unsigned char width=0, char pad='0')
 
 String (float, unsigned char decimalPlaces=2)
 
 String (double, unsigned char decimalPlaces=2)
 
Stringoperator= (const String &rhs)
 
Stringoperator= (const char *cstr)
 
Stringoperator= (String &&rval) noexcept
 
Stringoperator= (StringSumHelper &&rval) noexcept
 
bool concat (const String &str)
 
bool concat (const FlashString &fstr)
 
bool concat (const char *cstr)
 
bool concat (const char *cstr, size_t length)
 
bool concat (char c)
 
bool concat (unsigned char num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (int num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (unsigned int num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (long num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (long long num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (unsigned long num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (unsigned long long num, unsigned char base=10, unsigned char width=0, char pad='0')
 
bool concat (float num)
 
bool concat (double num)
 
template<typename E >
constexpr std::enable_if< std::is_enum< E >::value &&!std::is_convertible< E, int >::value, bool >::type concat (E value)
 
Stringoperator+= (const String &rhs)
 
Stringoperator+= (const FlashString &rhs)
 
Stringoperator+= (const char *cstr)
 
template<typename T >
Stringoperator+= (T value)
 
int compareTo (const char *cstr, size_t length) const
 
int compareTo (const String &s) const
 
bool equals (const String &s) const
 
bool equals (const char *cstr) const
 
bool equals (const char *cstr, size_t length) const
 
bool equals (const FlashString &fstr) const
 
bool operator== (const String &rhs) const
 
bool operator== (const char *cstr) const
 
bool operator== (const FlashString &fstr) const
 
bool operator!= (const String &rhs) const
 
bool operator!= (const char *cstr) const
 
bool operator< (const String &rhs) const
 
bool operator> (const String &rhs) const
 
bool operator<= (const String &rhs) const
 
bool operator>= (const String &rhs) const
 
bool equalsIgnoreCase (const char *cstr) const
 
bool equalsIgnoreCase (const char *cstr, size_t length) const
 
bool equalsIgnoreCase (const String &s2) const
 
bool equalsIgnoreCase (const FlashString &fstr) const
 
char operator[] (size_t index) const
 
char & operator[] (size_t index)
 
int indexOf (char ch, size_t fromIndex=0) const
 
int indexOf (const char *s2_buf, size_t fromIndex, size_t s2_len) const
 
int indexOf (const char *s2_buf, size_t fromIndex=0) const
 
int indexOf (const String &s2, size_t fromIndex=0) const
 
int lastIndexOf (char ch) const
 
int lastIndexOf (char ch, size_t fromIndex) const
 
int lastIndexOf (const String &s2) const
 
int lastIndexOf (const String &s2, size_t fromIndex) const
 
int lastIndexOf (const char *s2_buf, size_t fromIndex, size_t s2_len) const
 
String substring (size_t from, size_t to) const
 
String substring (size_t from) const
 
void replace (char find, char replace)
 
bool replace (const String &find, const String &replace)
 
bool replace (const char *find_buf, size_t find_len, const char *replace_buf, size_t replace_len)
 
void remove (size_t index)
 
void remove (size_t index, size_t count)
 
StringpadLeft (uint16_t minWidth, char c=' ')
 Insert padding at start of string if length is less than given width. More...
 
StringpadRight (uint16_t minWidth, char c=' ')
 Insert padding at end of string if length is less than given width. More...
 
Stringpad (int16_t minWidth, char c=' ')
 Pad string if length is less than given width. More...
 

Additional Inherited Members

- Static Public Attributes inherited from String
static const String nullstr
 A null string evaluates to false. More...
 
static const String empty
 An empty string evaluates to true. More...
 
static constexpr size_t SSO_CAPACITY = STRING_OBJECT_SIZE - 2
 Max chars. (excluding NUL terminator) we can store in SSO mode. More...
 
- Protected Member Functions inherited from String
void invalidate (void)
 
bool isNull () const
 
char * buffer ()
 
const char * cbuffer () const
 
size_t capacity () const
 
void setlen (size_t len)
 
Stringcopy (const char *cstr, size_t length)
 
Stringcopy (flash_string_t pstr, size_t length)
 
void move (String &rhs)
 
- Protected Attributes inherited from String
union {
   PtrBuf   ptr
 
   SsoBuf   sso
 
}; 
 

Constructor & Destructor Documentation

◆ StringSumHelper() [1/12]

StringSumHelper::StringSumHelper ( const String s)
inline

◆ StringSumHelper() [2/12]

StringSumHelper::StringSumHelper ( const char *  p)
inline

◆ StringSumHelper() [3/12]

StringSumHelper::StringSumHelper ( char  c)
inline

◆ StringSumHelper() [4/12]

StringSumHelper::StringSumHelper ( unsigned char  num)
inline

◆ StringSumHelper() [5/12]

StringSumHelper::StringSumHelper ( int  num)
inline

◆ StringSumHelper() [6/12]

StringSumHelper::StringSumHelper ( unsigned int  num)
inline

◆ StringSumHelper() [7/12]

StringSumHelper::StringSumHelper ( long  num)
inline

◆ StringSumHelper() [8/12]

StringSumHelper::StringSumHelper ( long long  num)
inline

◆ StringSumHelper() [9/12]

StringSumHelper::StringSumHelper ( unsigned long  num)
inline

◆ StringSumHelper() [10/12]

StringSumHelper::StringSumHelper ( unsigned long long  num)
inline

◆ StringSumHelper() [11/12]

StringSumHelper::StringSumHelper ( float  num)
inline

◆ StringSumHelper() [12/12]

StringSumHelper::StringSumHelper ( double  num)
inline

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