mbed client lightswitch demo
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of mbed-client-classic-example-lwip by
String Class Reference
Simple C++ string class, used as replacement for std::string. More...
#include <m2mstring.h>
Public Member Functions | |
size_type | size () const |
size without terminating NULL | |
size_type | length () const |
as size() | |
size_type | capacity () const |
size if fully used | |
const char * | c_str () const |
raw data | |
void | reserve (size_type n) |
Reserve internal string memory so that n characters can be put into the string (plus 1 for the NULL char). | |
void | resize (size_type n) |
Resize string. | |
void | resize (size_type n, char c) |
Resize string. | |
void | swap (String &) |
swap contents | |
String & | erase (size_type pos, size_type len) |
erase len characters at position pos | |
String & | append (const char *str, size_type n) |
Append n characters of a string. |
Detailed Description
Simple C++ string class, used as replacement for std::string.
Definition at line 27 of file m2mstring.h.
Member Function Documentation
String & append | ( | const char * | str, |
size_type | n | ||
) |
Append n characters of a string.
Definition at line 253 of file m2mstring.cpp.
const char* c_str | ( | ) | const |
raw data
Definition at line 66 of file m2mstring.h.
size_type capacity | ( | ) | const |
size if fully used
Definition at line 62 of file m2mstring.h.
String & erase | ( | size_type | pos, |
size_type | len | ||
) |
erase len characters at position pos
Definition at line 229 of file m2mstring.cpp.
size_type length | ( | ) | const |
as size()
Definition at line 59 of file m2mstring.h.
void reserve | ( | size_type | n ) |
Reserve internal string memory so that n characters can be put into the string (plus 1 for the NULL char).
If there is already enough memory, nothing happens, if not, the memory will be realloated to exactly this amount.
Definition at line 327 of file m2mstring.cpp.
void resize | ( | size_type | n ) |
Resize string.
If n is less than the current size, the string will be truncated. If n is larger, the memory will be reallocated to exactly this amount, and the additional characters will be NULL characters.
Definition at line 335 of file m2mstring.cpp.
void resize | ( | size_type | n, |
char | c | ||
) |
Resize string.
If n is less than the current size, the string will be truncated. If n is larger, the memory will be reallocated to exactly this amount, and the additional characters will be c characters.
Definition at line 340 of file m2mstring.cpp.
size_type size | ( | ) | const |
size without terminating NULL
Definition at line 58 of file m2mstring.h.
void swap | ( | String & | s ) |
swap contents
Definition at line 354 of file m2mstring.cpp.
Generated on Tue Jul 12 2022 18:27:29 by 1.7.2