RUI3 (RAK Unified Interface 3) - RAK4631
String

Public Member Functions

 String (const char *cstr="")
 
 String (const String &str)
 
 String (const __FlashStringHelper *str)
 
 String (char c)
 
 String (unsigned char, unsigned char base=10)
 
 String (int, unsigned char base=10)
 
 String (unsigned int, unsigned char base=10)
 
 String (long, unsigned char base=10)
 
 String (unsigned long, unsigned char base=10)
 
 String (float, unsigned char decimalPlaces=2)
 
 String (double, unsigned char decimalPlaces=2)
 
 ~String (void)
 
unsigned char reserve (unsigned int size)
 
unsigned int length (void) const
 
Stringoperator= (const String &rhs)
 
Stringoperator= (const char *cstr)
 
Stringoperator= (const __FlashStringHelper *str)
 
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 (const __FlashStringHelper *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+= (const __FlashStringHelper *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
 
char * begin ()
 
char * end ()
 
const char * begin () const
 
const char * end () 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) const
 
String substring (unsigned int beginIndex, unsigned int endIndex) 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
 
double toDouble (void) const
 

Protected Attributes

char * buffer
 
unsigned int capacity
 
unsigned int len
 

Friends

StringSumHelperoperator+ (const StringSumHelper &lhs, const String &rhs)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, const char *cstr)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, char c)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, unsigned char num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, int num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, unsigned int num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, long num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, unsigned long num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, float num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, double num)
 
StringSumHelperoperator+ (const StringSumHelper &lhs, const __FlashStringHelper *rhs)
 

Detailed Description

Constructor & Destructor Documentation

◆ String() [1/11]

String ( const char *  cstr = "")

◆ String() [2/11]

String ( const String str)

◆ String() [3/11]

String ( const __FlashStringHelper *  str)

◆ String() [4/11]

String ( char  c)
explicit

◆ String() [5/11]

String ( unsigned  char,
unsigned char  base = 10 
)
explicit

◆ String() [6/11]

String ( int  ,
unsigned char  base = 10 
)
explicit

◆ String() [7/11]

String ( unsigned  int,
unsigned char  base = 10 
)
explicit

◆ String() [8/11]

String ( long  ,
unsigned char  base = 10 
)
explicit

◆ String() [9/11]

String ( unsigned  long,
unsigned char  base = 10 
)
explicit

◆ String() [10/11]

String ( float  ,
unsigned char  decimalPlaces = 2 
)
explicit

◆ String() [11/11]

String ( double  ,
unsigned char  decimalPlaces = 2 
)
explicit

◆ ~String()

~String ( void  )

Member Function Documentation

◆ reserve()

unsigned char reserve ( unsigned int  size)

◆ length()

unsigned int length ( void  ) const

◆ operator=() [1/3]

String& operator= ( const String rhs)

◆ operator=() [2/3]

String& operator= ( const char *  cstr)

◆ operator=() [3/3]

String& operator= ( const __FlashStringHelper *  str)

◆ concat() [1/11]

unsigned char concat ( const String str)

◆ concat() [2/11]

unsigned char concat ( const char *  cstr)

◆ concat() [3/11]

unsigned char concat ( char  c)

◆ concat() [4/11]

unsigned char concat ( unsigned char  c)

◆ concat() [5/11]

unsigned char concat ( int  num)

◆ concat() [6/11]

unsigned char concat ( unsigned int  num)

◆ concat() [7/11]

unsigned char concat ( long  num)

◆ concat() [8/11]

unsigned char concat ( unsigned long  num)

◆ concat() [9/11]

unsigned char concat ( float  num)

◆ concat() [10/11]

unsigned char concat ( double  num)

◆ concat() [11/11]

unsigned char concat ( const __FlashStringHelper *  str)

◆ operator+=() [1/11]

String& operator+= ( const String rhs)

◆ operator+=() [2/11]

String& operator+= ( const char *  cstr)

◆ operator+=() [3/11]

String& operator+= ( char  c)

◆ operator+=() [4/11]

String& operator+= ( unsigned char  num)

◆ operator+=() [5/11]

String& operator+= ( int  num)

◆ operator+=() [6/11]

String& operator+= ( unsigned int  num)

◆ operator+=() [7/11]

String& operator+= ( long  num)

◆ operator+=() [8/11]

String& operator+= ( unsigned long  num)

◆ operator+=() [9/11]

String& operator+= ( float  num)

◆ operator+=() [10/11]

String& operator+= ( double  num)

◆ operator+=() [11/11]

String& operator+= ( const __FlashStringHelper *  str)

◆ operator StringIfHelperType()

operator StringIfHelperType ( ) const

◆ compareTo()

int compareTo ( const String s) const

◆ equals() [1/2]

unsigned char equals ( const String s) const

◆ equals() [2/2]

unsigned char equals ( const char *  cstr) const

◆ operator==() [1/2]

unsigned char operator== ( const String rhs) const

◆ operator==() [2/2]

unsigned char operator== ( const char *  cstr) const

◆ operator!=() [1/2]

unsigned char operator!= ( const String rhs) const

◆ operator!=() [2/2]

unsigned char operator!= ( const char *  cstr) const

◆ operator<()

unsigned char operator< ( const String rhs) const

◆ operator>()

unsigned char operator> ( const String rhs) const

◆ operator<=()

unsigned char operator<= ( const String rhs) const

◆ operator>=()

unsigned char operator>= ( const String rhs) const

◆ equalsIgnoreCase()

unsigned char equalsIgnoreCase ( const String s) const

◆ startsWith() [1/2]

unsigned char startsWith ( const String prefix) const

◆ startsWith() [2/2]

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

◆ endsWith()

unsigned char endsWith ( const String suffix) const

◆ charAt()

char charAt ( unsigned int  index) const

◆ setCharAt()

void setCharAt ( unsigned int  index,
char  c 
)

◆ operator[]() [1/2]

char operator[] ( unsigned int  index) const

◆ operator[]() [2/2]

char& operator[] ( unsigned int  index)

◆ getBytes()

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

◆ toCharArray()

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

◆ c_str()

const char* c_str ( ) const

◆ begin() [1/2]

char* begin ( void  )

◆ end() [1/2]

char* end ( void  )

◆ begin() [2/2]

const char* begin ( void  ) const

◆ end() [2/2]

const char* end ( void  ) const

◆ indexOf() [1/4]

int indexOf ( char  ch) const

◆ indexOf() [2/4]

int indexOf ( char  ch,
unsigned int  fromIndex 
) const

◆ indexOf() [3/4]

int indexOf ( const String str) const

◆ indexOf() [4/4]

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

◆ lastIndexOf() [1/4]

int lastIndexOf ( char  ch) const

◆ lastIndexOf() [2/4]

int lastIndexOf ( char  ch,
unsigned int  fromIndex 
) const

◆ lastIndexOf() [3/4]

int lastIndexOf ( const String str) const

◆ lastIndexOf() [4/4]

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

◆ substring() [1/2]

String substring ( unsigned int  beginIndex) const

◆ substring() [2/2]

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

◆ replace() [1/2]

void replace ( char  find,
char  replace 
)

◆ replace() [2/2]

void replace ( const String find,
const String replace 
)

◆ remove() [1/2]

void remove ( unsigned int  index)

◆ remove() [2/2]

void remove ( unsigned int  index,
unsigned int  count 
)

◆ toLowerCase()

void toLowerCase ( void  )

◆ toUpperCase()

void toUpperCase ( void  )

◆ trim()

void trim ( void  )

◆ toInt()

long toInt ( void  ) const

◆ toFloat()

float toFloat ( void  ) const

◆ toDouble()

double toDouble ( void  ) const

Friends And Related Function Documentation

◆ operator+ [1/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
const String rhs 
)
friend

◆ operator+ [2/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
const char *  cstr 
)
friend

◆ operator+ [3/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
char  c 
)
friend

◆ operator+ [4/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
unsigned char  num 
)
friend

◆ operator+ [5/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
int  num 
)
friend

◆ operator+ [6/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
unsigned int  num 
)
friend

◆ operator+ [7/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
long  num 
)
friend

◆ operator+ [8/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
unsigned long  num 
)
friend

◆ operator+ [9/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
float  num 
)
friend

◆ operator+ [10/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
double  num 
)
friend

◆ operator+ [11/11]

StringSumHelper& operator+ ( const StringSumHelper lhs,
const __FlashStringHelper *  rhs 
)
friend

Field Documentation

◆ buffer

char* buffer
protected

◆ capacity

unsigned int capacity
protected

◆ len

unsigned int len
protected