COSA
An Object-Oriented Platform for Arduino Programming
__StringSumHelper Class Reference

#include <String.hh>

Inheritance diagram for __StringSumHelper:
Inheritance graph
Collaboration diagram for __StringSumHelper:
Collaboration graph

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 (unsigned long num)
 
 __StringSumHelper (float num)
 
 __StringSumHelper (double num)
 
unsigned char reserve (unsigned int size)
 
unsigned int length (void) const
 
unsigned char concat (const String &str)
 
unsigned char concat (const char *cstr)
 
unsigned char concat (char c)
 
unsigned char concat (unsigned char c)
 
unsigned char concat (int num)
 
unsigned char concat (unsigned int num)
 
unsigned char concat (long num)
 
unsigned char concat (unsigned long num)
 
unsigned char concat (float num)
 
unsigned char concat (double num)
 
unsigned char concat (str_P str)
 
Stringoperator+= (const String &rhs)
 
Stringoperator+= (const char *cstr)
 
Stringoperator+= (char c)
 
Stringoperator+= (unsigned char num)
 
Stringoperator+= (int num)
 
Stringoperator+= (unsigned int num)
 
Stringoperator+= (long num)
 
Stringoperator+= (unsigned long num)
 
Stringoperator+= (float num)
 
Stringoperator+= (double num)
 
Stringoperator+= (str_P str)
 
 operator StringIfHelperType () const
 
int compareTo (const String &s) const
 
unsigned char equals (const String &s) const
 
unsigned char equals (const char *cstr) const
 
unsigned char operator== (const String &rhs) const
 
unsigned char operator== (const char *cstr) const
 
unsigned char operator!= (const String &rhs) const
 
unsigned char operator!= (const char *cstr) const
 
unsigned char operator< (const String &rhs) const
 
unsigned char operator> (const String &rhs) const
 
unsigned char operator<= (const String &rhs) const
 
unsigned char operator>= (const String &rhs) const
 
unsigned char equalsIgnoreCase (const String &s) const
 
unsigned char startsWith (const String &prefix) const
 
unsigned char startsWith (const String &prefix, unsigned int offset) const
 
unsigned char endsWith (const String &suffix) const
 
char charAt (unsigned int index) const
 
void setCharAt (unsigned int index, char c)
 
char operator[] (unsigned int index) const
 
char & operator[] (unsigned int index)
 
void getBytes (unsigned char *buf, unsigned int bufsize, unsigned int index=0) const
 
void toCharArray (char *buf, unsigned int bufsize, unsigned int index=0) const
 
const char * c_str () const
 
int indexOf (char ch) const
 
int indexOf (char ch, unsigned int fromIndex) const
 
int indexOf (const String &str) const
 
int indexOf (const String &str, unsigned int fromIndex) const
 
int lastIndexOf (char ch) const
 
int lastIndexOf (char ch, unsigned int fromIndex) const
 
int lastIndexOf (const String &str) const
 
int lastIndexOf (const String &str, unsigned int fromIndex) const
 
String substring (unsigned int beginIndex, unsigned int endIndex) const
 
String substring (unsigned int beginIndex) const
 
void replace (char find, char replace)
 
void replace (const String &find, const String &replace)
 
void remove (unsigned int index)
 
void remove (unsigned int index, unsigned int count)
 
void toLowerCase (void)
 
void toUpperCase (void)
 
void trim (void)
 
long toInt (void) const
 
float toFloat (void) const
 

Protected Member Functions

unsigned char concat (const char *cstr, unsigned int length)
 
void init (void)
 
void invalidate (void)
 
unsigned char changeBuffer (unsigned int maxStrLen)
 
Stringcopy (const char *cstr, unsigned int length)
 
Stringcopy (str_P pstr, unsigned int length)
 
void move (String &rhs)
 

Protected Attributes

char * m_buffer
 the actual char array More...
 
unsigned int m_capacity
 the array length minus one (for the '\0') More...
 
unsigned int m_length
 the String length (not counting the '\0') More...
 

Detailed Description

An inherited String class for holding the result of a concatenation. These result objects are assumed to be writable by subsequent concatenations.

Definition at line 249 of file String.hh.

Constructor & Destructor Documentation

__StringSumHelper::__StringSumHelper ( const String s)
inline

Definition at line 252 of file String.hh.

__StringSumHelper::__StringSumHelper ( const char *  p)
inline

Definition at line 253 of file String.hh.

__StringSumHelper::__StringSumHelper ( char  c)
inline

Definition at line 254 of file String.hh.

__StringSumHelper::__StringSumHelper ( unsigned char  num)
inline

Definition at line 255 of file String.hh.

__StringSumHelper::__StringSumHelper ( int  num)
inline

Definition at line 256 of file String.hh.

__StringSumHelper::__StringSumHelper ( unsigned int  num)
inline

Definition at line 257 of file String.hh.

__StringSumHelper::__StringSumHelper ( long  num)
inline

Definition at line 258 of file String.hh.

__StringSumHelper::__StringSumHelper ( unsigned long  num)
inline

Definition at line 259 of file String.hh.

__StringSumHelper::__StringSumHelper ( float  num)
inline

Definition at line 260 of file String.hh.

__StringSumHelper::__StringSumHelper ( double  num)
inline

Definition at line 261 of file String.hh.

Member Function Documentation

const char* String::c_str ( ) const
inlineinherited

Definition at line 186 of file String.hh.

unsigned char String::changeBuffer ( unsigned int  maxStrLen)
protectedinherited

Definition at line 153 of file String.cpp.

char String::charAt ( unsigned int  index) const
inherited

Character acccess.

Definition at line 535 of file String.cpp.

int String::compareTo ( const String s) const
inherited

Definition at line 443 of file String.cpp.

unsigned char String::concat ( const String str)
inherited

Concatenate value. Returns true on success, false on failure (in which case, the string is left unchanged). If the argument is null or invalid, the concatenation is considered unsucessful.

Definition at line 252 of file String.cpp.

unsigned char String::concat ( const char *  cstr)
inherited

Definition at line 270 of file String.cpp.

unsigned char String::concat ( char  c)
inherited

Definition at line 277 of file String.cpp.

unsigned char String::concat ( unsigned char  c)
inherited

Definition at line 286 of file String.cpp.

unsigned char String::concat ( int  num)
inherited

Definition at line 294 of file String.cpp.

unsigned char String::concat ( unsigned int  num)
inherited

Definition at line 302 of file String.cpp.

unsigned char String::concat ( long  num)
inherited

Definition at line 310 of file String.cpp.

unsigned char String::concat ( unsigned long  num)
inherited

Definition at line 318 of file String.cpp.

unsigned char String::concat ( float  num)
inherited

Definition at line 326 of file String.cpp.

unsigned char String::concat ( double  num)
inherited

Definition at line 334 of file String.cpp.

unsigned char String::concat ( str_P  str)
inherited

Definition at line 342 of file String.cpp.

unsigned char String::concat ( const char *  cstr,
unsigned int  length 
)
protectedinherited

Definition at line 258 of file String.cpp.

String & String::copy ( const char *  cstr,
unsigned int  length 
)
protectedinherited

Copy and move.

Definition at line 163 of file String.cpp.

String & String::copy ( str_P  pstr,
unsigned int  length 
)
protectedinherited

Definition at line 176 of file String.cpp.

unsigned char String::endsWith ( const String suffix) const
inherited

Definition at line 526 of file String.cpp.

unsigned char String::equals ( const String s) const
inherited

Definition at line 456 of file String.cpp.

unsigned char String::equals ( const char *  cstr) const
inherited

Definition at line 462 of file String.cpp.

unsigned char String::equalsIgnoreCase ( const String s) const
inherited

Definition at line 496 of file String.cpp.

void String::getBytes ( unsigned char *  buf,
unsigned int  bufsize,
unsigned int  index = 0 
) const
inherited

Definition at line 565 of file String.cpp.

int String::indexOf ( char  ch) const
inherited

Search.

Definition at line 579 of file String.cpp.

int String::indexOf ( char  ch,
unsigned int  fromIndex 
) const
inherited

Definition at line 585 of file String.cpp.

int String::indexOf ( const String str) const
inherited

Definition at line 594 of file String.cpp.

int String::indexOf ( const String str,
unsigned int  fromIndex 
) const
inherited

Definition at line 600 of file String.cpp.

void String::init ( void  )
inlineprotectedinherited

Definition at line 127 of file String.cpp.

void String::invalidate ( void  )
protectedinherited

Definition at line 135 of file String.cpp.

int String::lastIndexOf ( char  ch) const
inherited

Definition at line 609 of file String.cpp.

int String::lastIndexOf ( char  ch,
unsigned int  fromIndex 
) const
inherited

Definition at line 615 of file String.cpp.

int String::lastIndexOf ( const String str) const
inherited

Definition at line 627 of file String.cpp.

int String::lastIndexOf ( const String str,
unsigned int  fromIndex 
) const
inherited

Definition at line 633 of file String.cpp.

unsigned int String::length ( void  ) const
inlineinherited

Return string length.

Definition at line 83 of file String.hh.

void String::move ( String rhs)
protectedinherited

Definition at line 188 of file String.cpp.

String::operator StringIfHelperType ( ) const
inlineinherited

Comparison (only works w/ Strings and "strings").

Definition at line 151 of file String.hh.

unsigned char String::operator!= ( const String rhs) const
inlineinherited

Definition at line 161 of file String.hh.

unsigned char String::operator!= ( const char *  cstr) const
inlineinherited

Definition at line 162 of file String.hh.

String& String::operator+= ( const String rhs)
inlineinherited

If there's not enough memory for the concatenated value, the string will be left unchanged (but this isn't signalled in any way)

Definition at line 124 of file String.hh.

String& String::operator+= ( const char *  cstr)
inlineinherited

Definition at line 125 of file String.hh.

String& String::operator+= ( char  c)
inlineinherited

Definition at line 126 of file String.hh.

String& String::operator+= ( unsigned char  num)
inlineinherited

Definition at line 127 of file String.hh.

String& String::operator+= ( int  num)
inlineinherited

Definition at line 128 of file String.hh.

String& String::operator+= ( unsigned int  num)
inlineinherited

Definition at line 129 of file String.hh.

String& String::operator+= ( long  num)
inlineinherited

Definition at line 130 of file String.hh.

String& String::operator+= ( unsigned long  num)
inlineinherited

Definition at line 131 of file String.hh.

String& String::operator+= ( float  num)
inlineinherited

Definition at line 132 of file String.hh.

String& String::operator+= ( double  num)
inlineinherited

Definition at line 133 of file String.hh.

String& String::operator+= ( str_P  str)
inlineinherited

Definition at line 134 of file String.hh.

unsigned char String::operator< ( const String rhs) const
inherited

Definition at line 472 of file String.cpp.

unsigned char String::operator<= ( const String rhs) const
inherited

Definition at line 484 of file String.cpp.

unsigned char String::operator== ( const String rhs) const
inlineinherited

Definition at line 159 of file String.hh.

unsigned char String::operator== ( const char *  cstr) const
inlineinherited

Definition at line 160 of file String.hh.

unsigned char String::operator> ( const String rhs) const
inherited

Definition at line 478 of file String.cpp.

unsigned char String::operator>= ( const String rhs) const
inherited

Definition at line 490 of file String.cpp.

char String::operator[] ( unsigned int  index) const
inherited

Definition at line 558 of file String.cpp.

char & String::operator[] ( unsigned int  index)
inherited

Definition at line 547 of file String.cpp.

void String::remove ( unsigned int  index)
inherited

Definition at line 720 of file String.cpp.

void String::remove ( unsigned int  index,
unsigned int  count 
)
inherited

Definition at line 727 of file String.cpp.

void String::replace ( char  find,
char  replace 
)
inherited

Modification.

Definition at line 667 of file String.cpp.

void String::replace ( const String find,
const String replace 
)
inherited

Definition at line 676 of file String.cpp.

unsigned char String::reserve ( unsigned int  size)
inherited

Memory Management: Return true on success, false on failure (in which case, the string is left unchanged). reserve(0), if successful, will validate an invalid string (i.e., "if (s)" will be true afterwards)

Definition at line 144 of file String.cpp.

void String::setCharAt ( unsigned int  index,
char  c 
)
inherited

Definition at line 541 of file String.cpp.

unsigned char String::startsWith ( const String prefix) const
inherited

Definition at line 510 of file String.cpp.

unsigned char String::startsWith ( const String prefix,
unsigned int  offset 
) const
inherited

Definition at line 517 of file String.cpp.

String String::substring ( unsigned int  beginIndex,
unsigned int  endIndex 
) const
inherited

Sub-string.

Definition at line 649 of file String.cpp.

String String::substring ( unsigned int  beginIndex) const
inlineinherited

Definition at line 204 of file String.hh.

void String::toCharArray ( char *  buf,
unsigned int  bufsize,
unsigned int  index = 0 
) const
inlineinherited

Definition at line 181 of file String.hh.

float String::toFloat ( void  ) const
inherited

Definition at line 777 of file String.cpp.

long String::toInt ( void  ) const
inherited

Parsing/Conversion.

Definition at line 770 of file String.cpp.

void String::toLowerCase ( void  )
inherited

Definition at line 739 of file String.cpp.

void String::toUpperCase ( void  )
inherited

Definition at line 748 of file String.cpp.

void String::trim ( void  )
inherited

Definition at line 757 of file String.cpp.

Member Data Documentation

char* String::m_buffer
protectedinherited

the actual char array

Definition at line 227 of file String.hh.

unsigned int String::m_capacity
protectedinherited

the array length minus one (for the '\0')

Definition at line 228 of file String.hh.

unsigned int String::m_length
protectedinherited

the String length (not counting the '\0')

Definition at line 229 of file String.hh.


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