F439_CPP_SPI_RA8875_TFT_LCD_03 1.0
STM32F439 SPI RA8875 7-inch TFT display demo built on the STM32_GFX and STM32_RA8875 libraries
Loading...
Searching...
No Matches
String Class Reference

Minimal Arduino-String stand-in (see file description). More...

#include <WString.h>

Public Member Functions

 String (const char *s="")
 
 String (const String &o)
 
String & operator= (const String &o)
 
String & operator= (const char *s)
 
 ~String ()
 Destructor frees the copy.
 
const char * c_str () const
 
unsigned int length () const
 
char operator[] (unsigned int i) const
 

Detailed Description

Minimal Arduino-String stand-in (see file description).

Definition at line 22 of file WString.h.

Constructor & Destructor Documentation

◆ String() [1/2]

String::String ( const char * s = "")
inline

Construct from a C string (copied).

Parameters
sThe C string (nullptr gives an empty String)

Definition at line 26 of file WString.h.

◆ String() [2/2]

String::String ( const String & o)
inline

Copy constructor.

Parameters
oThe String to copy

Definition at line 29 of file WString.h.

◆ ~String()

String::~String ( )
inline

Destructor frees the copy.

Definition at line 46 of file WString.h.

Member Function Documentation

◆ c_str()

const char * String::c_str ( ) const
inline
Returns
The NUL-terminated contents (never nullptr).

Definition at line 49 of file WString.h.

Referenced by Adafruit_GFX::getTextBounds(), and Print::print().

◆ length()

unsigned int String::length ( ) const
inline
Returns
Length in characters.

Definition at line 51 of file WString.h.

Referenced by Adafruit_GFX::getTextBounds(), and Print::print().

◆ operator=() [1/2]

String & String::operator= ( const char * s)
inline

Assign from a C string (copied).

Parameters
sThe C string (nullptr empties the String)
Returns
This String

Definition at line 41 of file WString.h.

◆ operator=() [2/2]

String & String::operator= ( const String & o)
inline

Copy assignment.

Parameters
oThe String to copy
Returns
This String

Definition at line 33 of file WString.h.

◆ operator[]()

char String::operator[] ( unsigned int i) const
inline
Parameters
iIndex of the character
Returns
Character at index i, or 0 if out of range.

Definition at line 54 of file WString.h.


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