JsonParserGeneratorRK
Public Member Functions
StringSumHelper Class Reference

Class used when appending mutiple String and other values using +. More...

#include <spark_wiring_string.h>

Inheritance diagram for StringSumHelper:
String

Public Member Functions

 StringSumHelper (const String &s)
 Append a String object. More...
 
 StringSumHelper (const char *p)
 Append a const char * (c-string, null terminated) More...
 
 StringSumHelper (char c)
 Append a single character. More...
 
 StringSumHelper (unsigned char num)
 Append a byte as a decimal number 0 - 255. More...
 
 StringSumHelper (int num)
 Append a 32-bit signed integer as a decimal number. More...
 
 StringSumHelper (unsigned int num)
 Append a 32-bit unsigned integer as a decimal number. More...
 
 StringSumHelper (long num)
 Append a 32-bit long integer as a decimal number. More...
 
 StringSumHelper (unsigned long num)
 Append a 32-bit unsigned long as a decimal number. More...
 
- Public Member Functions inherited from String
 String (const char *cstr="")
 Construct a String object from a c-string (null-terminated) More...
 
 String (const char *cstr, unsigned int length)
 Construct a String object from a pointer and length. More...
 
 String (const String &str)
 Construct a String object as a copy of another string. More...
 
 String (const Printable &printable)
 Construct a String object from any Printable object. More...
 
 String (char c)
 Construct a String containing a single character. More...
 
 String (unsigned char b, unsigned char base=10)
 Construct a String from a unsigned char (uint8_t) value, expressed as a number. More...
 
 String (int value, unsigned char base=10)
 Construct a String from a int (32 bit signed integer) value, expressed as a number. More...
 
 String (unsigned int value, unsigned char base=10)
 Construct a String from a unsigned int (32 bit unsigned integer) value, expressed as a number. More...
 
 String (long value, unsigned char base=10)
 Construct a String from a long (32 bit signed integer) value, expressed as a number. More...
 
 String (unsigned long value, unsigned char base=10)
 Construct a String from a unsigned long (32 bit unsigned integer) value, expressed as a number. More...
 
 String (float value, int decimalPlaces=6)
 Construct a String from a float (32 bit single precision floating point) value, expressed as a number. More...
 
 String (double value, int decimalPlaces=6)
 Construct a String from a double (64 bit double precision floating point) value, expressed as a number. More...
 
 ~String (void)
 Destructor. Also deletes the underlying dynamically allocated string.
 
unsigned char reserve (unsigned int size)
 Reserves a buffer of size. More...
 
unsigned int length (void) const
 Returns the length of the string in bytes. More...
 
Stringoperator= (const String &rhs)
 Assigns this string to have a copy of String rhs. More...
 
Stringoperator= (const char *cstr)
 Assigns this string to have a copy of c-string (null-terminated) cstr. More...
 
 operator const char * () const
 Returns the contents this String as a c-string (null-terminated) More...
 
unsigned char concat (const String &str)
 Append (concatenate) a String object to the end of this String, modifying this string in place. More...
 
unsigned char concat (const char *cstr)
 Append (concatenate) a c-string (null-terminated) to the end of this String, modifying this string in place. More...
 
unsigned char concat (char c)
 Append (concatenate) a single character to the end of this String, modifying this string in place. More...
 
unsigned char concat (unsigned char c)
 Append (concatenate) the byte value c to the end of this String as a decimal number 0 - 255, modifying this string in place. More...
 
unsigned char concat (int num)
 Append (concatenate) the integer value num to the end of this String as a signed decimal number (base 10), modifying this string in place. More...
 
unsigned char concat (unsigned int num)
 Append (concatenate) the unsigned integer value num to the end of this String as a unsigned decimal number (base 10), modifying this string in place. More...
 
unsigned char concat (long num)
 Append (concatenate) the long integer value num to the end of this String as a signed decimal number (base 10), modifying this string in place. More...
 
unsigned char concat (unsigned long num)
 Append (concatenate) the unsigned long value num to the end of this String as a unsigned decimal number (base 10), modifying this string in place. More...
 
unsigned char concat (float num)
 Append (concatenate) the float n to the end of this String as a decimal number (base 10), modifying this string in place. More...
 
unsigned char concat (double num)
 Append (concatenate) the double precision float n to the end of this String as a decimal number (base 10), modifying this string in place. More...
 
Stringoperator+= (const String &rhs)
 Appends (concatenate) a String object to the end of this String, modifying this string in place. More...
 
Stringoperator+= (const char *cstr)
 Appends (concatenate) a c-string (null-terminated) to the end of this String, modifying this string in place. More...
 
Stringoperator+= (char c)
 Appends (concatenate) a single character to the end of this String, modifying this string in place. More...
 
Stringoperator+= (unsigned char num)
 Append (concatenate) the byte value num to the end of this String as a decimal number 0 - 255, modifying this string in place. More...
 
Stringoperator+= (int num)
 Append (concatenate) the integer value num to the end of this String as a signed decimal number (base 10), modifying this string in place. More...
 
Stringoperator+= (unsigned int num)
 Append (concatenate) the unsigned integer value num to the end of this String as a unsigned decimal number (base 10), modifying this string in place. More...
 
Stringoperator+= (long num)
 Append (concatenate) the long integer value num to the end of this String as a signed decimal number (base 10), modifying this string in place. More...
 
Stringoperator+= (unsigned long num)
 Append (concatenate) the unsigned long value num to the end of this String as a unsigned decimal number (base 10), modifying this string in place. More...
 
int compareTo (const String &s) const
 Compares this string to another string using strcmp (case-sensitive) More...
 
unsigned char equals (const String &s) const
 Returns true if this string is equal to another string (case-sensitive) More...
 
unsigned char equals (const char *cstr) const
 Returns true if this string equal to another string (case-sensitive) More...
 
unsigned char operator== (const String &rhs) const
 Returns true if this string is equal to another string (case-sensitive) More...
 
unsigned char operator== (const char *cstr) const
 Returns true if this string equal to another string (case-sensitive) More...
 
unsigned char operator!= (const String &rhs) const
 Returns true if this string is greater than to another string (case-sensitive) More...
 
unsigned char operator!= (const char *cstr) const
 Returns true if this string not equal to another string (case-sensitive) More...
 
unsigned char operator< (const String &rhs) const
 Returns true if this string is less than to another string (case-sensitive) More...
 
unsigned char operator> (const String &rhs) const
 Returns true if this string is greater than to another string (case-sensitive) More...
 
unsigned char operator<= (const String &rhs) const
 Returns true if this string is less than or equal to another string (case-sensitive) More...
 
unsigned char operator>= (const String &rhs) const
 Returns true if this string is greater than or equal to another string (case-sensitive) More...
 
unsigned char equalsIgnoreCase (const String &s) const
 Returns true if this string equals another string (case-insensitive) More...
 
unsigned char startsWith (const String &prefix) const
 Returns true if this string starts with prefix (case-sensitive) More...
 
unsigned char startsWith (const String &prefix, unsigned int offset) const
 Returns true if this string contains prefix at specified offset (case-sensitive) More...
 
unsigned char endsWith (const String &suffix) const
 Returns true if this string ends with suffix (case-sensitive) More...
 
char charAt (unsigned int index) const
 Gets the character at offset index. More...
 
void setCharAt (unsigned int index, char c)
 Set the character at offset index. More...
 
char operator[] (unsigned int index) const
 Gets the character at offset index. More...
 
char & operator[] (unsigned int index)
 Set the character at offset index. More...
 
void getBytes (unsigned char *buf, unsigned int bufsize, unsigned int index=0) const
 Copy the data out of this String into another buffer. More...
 
void toCharArray (char *buf, unsigned int bufsize, unsigned int index=0) const
 Copy the data out of this String into another buffer. More...
 
const char * c_str () const
 Returns a c-string (null-terminated) More...
 
int indexOf (char ch) const
 Search this string for a given character. More...
 
int indexOf (char ch, unsigned int fromIndex) const
 Search this string for a given character starting at an offset. More...
 
int indexOf (const String &str) const
 Search this string for a given String. More...
 
int indexOf (const String &str, unsigned int fromIndex) const
 Search this string for a given String starting at an offset. More...
 
int lastIndexOf (char ch) const
 Search this string for a given character, starting at the end. More...
 
int lastIndexOf (char ch, unsigned int fromIndex) const
 Search this string for a given character, starting at the fromIndex and going toward the beginning. More...
 
int lastIndexOf (const String &str) const
 Search this string for a last occurrence of str. More...
 
int lastIndexOf (const String &str, unsigned int fromIndex) const
 Search this string for a last occurrence of str starting at fromIndex. More...
 
String substring (unsigned int beginIndex) const
 Returns a String object with a copy of the characters starting at beginIndex through the end of the string. More...
 
String substring (unsigned int beginIndex, unsigned int endIndex) const
 Returns a String object with a copy of the characters in the specified range. More...
 
Stringreplace (char find, char replace)
 Replaces every occurrence of a character in the string with another character, modifying it in place. More...
 
Stringreplace (const String &find, const String &replace)
 Replaces every occurrence of a String with another String, modifying it in place. More...
 
Stringremove (unsigned int index)
 Removes characters from the String, modifying it in place. More...
 
Stringremove (unsigned int index, unsigned int count)
 Removes characters from the String, modifying it in place. More...
 
StringtoLowerCase (void)
 Converts this String to lower case, modifying it in place. More...
 
StringtoUpperCase (void)
 Converts this String to upper case, modifying it in place. More...
 
Stringtrim (void)
 Removes leading an trailing white spaces from this string, modifying it in place. More...
 
long toInt (void) const
 Converts this string to a signed integer (32-bit) More...
 
float toFloat (void) const
 Converts this string to a float (single precision floating point value) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from String
static String format (const char *format,...)
 Uses sprintf-style formatting to build a String object [static]. More...
 
- Protected Attributes inherited from String
char * buffer
 The buffer containing the data. It is always null-terminated.
 
unsigned int capacity
 The capacity of the buffer. The longest string is one byte less than this.
 
unsigned int len
 The String length (not counting the null terminator).
 
unsigned char flags
 Unused, for future features.
 

Detailed Description

Class used when appending mutiple String and other values using +.

Constructor & Destructor Documentation

◆ StringSumHelper() [1/8]

StringSumHelper::StringSumHelper ( const String s)
inline

Append a String object.

Parameters
sThe string to append.
Returns
StringSumHelper object that encapsulates a copy of that string for appending to another string.

◆ StringSumHelper() [2/8]

StringSumHelper::StringSumHelper ( const char *  p)
inline

Append a const char * (c-string, null terminated)

Parameters
pThe string to append.
Returns
StringSumHelper object that encapsulates a copy of that string for appending to another string.

◆ StringSumHelper() [3/8]

StringSumHelper::StringSumHelper ( char  c)
inline

Append a single character.

Parameters
cThe character to append.
Returns
StringSumHelper object that encapsulates a copy of that character for appending to another string.

◆ StringSumHelper() [4/8]

StringSumHelper::StringSumHelper ( unsigned char  num)
inline

Append a byte as a decimal number 0 - 255.

Parameters
numThe byte value to append.
Returns
StringSumHelper object that encapsulates the textual representation of the number for appending to another string.

◆ StringSumHelper() [5/8]

StringSumHelper::StringSumHelper ( int  num)
inline

Append a 32-bit signed integer as a decimal number.

Parameters
numThe byte value to append.
Returns
StringSumHelper object that encapsulates the textual representation of the number for appending to another string.

◆ StringSumHelper() [6/8]

StringSumHelper::StringSumHelper ( unsigned int  num)
inline

Append a 32-bit unsigned integer as a decimal number.

Parameters
numThe byte value to append.
Returns
StringSumHelper object that encapsulates the textual representation of the number for appending to another string.

◆ StringSumHelper() [7/8]

StringSumHelper::StringSumHelper ( long  num)
inline

Append a 32-bit long integer as a decimal number.

Parameters
numThe byte value to append.
Returns
StringSumHelper object that encapsulates the textual representation of the number for appending to another string.

◆ StringSumHelper() [8/8]

StringSumHelper::StringSumHelper ( unsigned long  num)
inline

Append a 32-bit unsigned long as a decimal number.

Parameters
numThe byte value to append.
Returns
StringSumHelper object that encapsulates the textual representation of the number for appending to another string.

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