Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
wstring< MAX_SIZE_ > Class Template Reference
A wstring implementation that uses a fixed size buffer. More...
#include <wstring.h>
Inherits etl::ibasic_string< wchar_t >.
Public Member Functions | |
wstring () | |
Constructor. | |
wstring (const etl::wstring< MAX_SIZE_ > &other) | |
Copy constructor. | |
wstring (const etl::wstring< MAX_SIZE_ > &other, size_t position, size_t length_=npos) | |
From other string, position, length. | |
wstring (const value_type *text) | |
Constructor, from null terminated text. | |
wstring (const value_type *text, size_t count) | |
Constructor, from null terminated text and count. | |
wstring (size_t count, value_type c) | |
Constructor, from initial size and value. | |
template<typename TIterator > | |
wstring (TIterator first, TIterator last) | |
Constructor, from an iterator range. | |
etl::wstring< MAX_SIZE_ > | substr (size_t position=0, size_t length_=npos) const |
Returns a sub-string. | |
wstring & | operator= (const wstring &rhs) |
Assignment operator. | |
void | repair () |
Fix the internal pointers after a low level memory copy. | |
iterator | begin () |
Returns an iterator to the beginning of the string. | |
const_iterator | begin () const |
Returns a const_iterator to the beginning of the string. | |
iterator | end () |
Returns an iterator to the end of the string. | |
const_iterator | end () const |
Returns a const_iterator to the end of the string. | |
const_iterator | cbegin () const |
Returns a const_iterator to the beginning of the string. | |
const_iterator | cend () const |
Returns a const_iterator to the end of the string. | |
reverse_iterator | rbegin () |
Returns an reverse iterator to the reverse beginning of the string. | |
const_reverse_iterator | rbegin () const |
Returns a const reverse iterator to the reverse beginning of the string. | |
reverse_iterator | rend () |
Returns a reverse iterator to the end + 1 of the string. | |
const_reverse_iterator | rend () const |
Returns a const reverse iterator to the end + 1 of the string. | |
const_reverse_iterator | crbegin () const |
Returns a const reverse iterator to the reverse beginning of the string. | |
const_reverse_iterator | crend () const |
Returns a const reverse iterator to the end + 1 of the string. | |
void | resize (size_t new_size) |
Resizes the string. | |
void | resize (size_t new_size, T value) |
Resizes the string. | |
reference | operator[] (size_t i) |
Returns a reference to the value at index 'i'. | |
const_reference | operator[] (size_t i) const |
Returns a const reference to the value at index 'i'. | |
reference | at (size_t i) |
Returns a reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::string_out_of_bounds if the index is out of range. | |
const_reference | at (size_t i) const |
Returns a const reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::string_out_of_bounds if the index is out of range. | |
reference | front () |
Returns a reference to the first element. | |
const_reference | front () const |
Returns a const reference to the first element. | |
reference | back () |
Returns a reference to the last element. | |
const_reference | back () const |
Returns a const reference to the last element. | |
pointer | data () |
Returns a pointer to the beginning of the string data. | |
const_pointer | data () const |
Returns a const pointer to the beginning of the string data. | |
void | assign (const etl::ibasic_string< T > &other) |
Assigns values to the string. | |
void | assign (const etl::ibasic_string< T > &other, size_t subposition, size_t sublength) |
Assigns values to the string. | |
void | assign (const_pointer other) |
Assigns values to the string. | |
void | assign (const_pointer other, size_t length_) |
Assigns values to the string. | |
template<typename TIterator > | |
void | assign (TIterator first, TIterator last) |
Assigns values to the string. | |
void | assign (size_t n, T value) |
Assigns values to the string. | |
void | clear () |
Clears the string. | |
void | push_back (T value) |
Inserts a value at the end of the string. | |
void | pop_back () |
Removes an element from the end of the string. | |
ibasic_string & | append (const ibasic_string &str) |
Appends to the string. | |
ibasic_string & | append (const ibasic_string &str, size_t subposition, size_t sublength=npos) |
Appends to the string. | |
ibasic_string & | append (const T *str) |
Appends to the string. | |
ibasic_string & | append (const T *str, size_t n) |
Appends to the string. | |
ibasic_string & | append (size_t n, T c) |
Appends to the string. | |
template<class TIterator > | |
ibasic_string & | append (TIterator first, TIterator last) |
Appends to the string. | |
iterator | insert (const_iterator position, T value) |
Inserts a value to the string. | |
void | insert (const_iterator position, size_t n, T value) |
Inserts 'n' values to the string. | |
template<class TIterator > | |
void | insert (iterator position, TIterator first, TIterator last) |
Inserts a range of values to the string. | |
etl::ibasic_string< T > & | insert (size_t position, const etl::ibasic_string< T > &str) |
Inserts a string at the specified position. | |
etl::ibasic_string< T > & | insert (size_t position, const etl::ibasic_string< T > &str, size_t subposition, size_t sublength) |
Inserts a string at the specified position from subposition for sublength. | |
etl::ibasic_string< T > & | insert (size_t position, const_pointer s) |
Inserts a string at the specified position from pointer. | |
etl::ibasic_string< T > & | insert (size_t position, const_pointer s, size_t n) |
Inserts a string at the specified position from pointer for n characters. | |
etl::ibasic_string< T > & | insert (size_t position, size_t n, value_type c) |
Insert n characters of c at position. | |
etl::ibasic_string< T > & | erase (size_t position, size_t length_=npos) |
Erases a sequence. | |
iterator | erase (iterator i_element) |
Erases an element. | |
iterator | erase (iterator first, iterator last) |
Erases a range of elements. | |
const_pointer | c_str () const |
Return a pointer to a C string. | |
size_t | copy (pointer s, size_t len, size_t pos=0) |
Copies a portion of a string. | |
size_t | find (const ibasic_string< T > &str, size_t pos=0) const |
Find content within the string. | |
size_t | find (const_pointer s, size_t pos=0) const |
Find content within the string. | |
size_t | find (const_pointer s, size_t pos, size_t n) const |
Find content within the string. | |
size_t | find (T c, size_t position=0) const |
Find character within the string. | |
size_t | rfind (const ibasic_string< T > &str, size_t position=npos) const |
Find content within the string. | |
size_t | rfind (const_pointer s, size_t position=npos) const |
Find content within the string. | |
size_t | rfind (const_pointer s, size_t position, size_t length_) const |
Find content within the string. | |
size_t | rfind (T c, size_t position=npos) const |
Find character within the string. | |
ibasic_string & | replace (size_t position, size_t length_, const ibasic_string &str) |
Replace 'length' characters from 'position' with 'str'. | |
ibasic_string & | replace (const_iterator first, const_iterator last, const ibasic_string &str) |
Replace characters from 'first' to one before 'last' with 'str'. | |
ibasic_string & | replace (size_t position, size_t length_, const ibasic_string &str, size_t subposition, size_t sublength) |
Replace characters from 'position' of 'length' with 'str' from 'subpsotion' of 'sublength'. | |
ibasic_string & | replace (size_t position, size_t length_, const_pointer s) |
Replace characters from 'position' of 'length' with pointed to string. | |
ibasic_string & | replace (const_iterator first, const_iterator last, const_pointer s) |
Replace characters from 'first' 'last' with pointed to string. | |
ibasic_string & | replace (size_t position, size_t length_, const_pointer s, size_t n) |
Replace characters from 'position' of 'length' with 'n' characters from pointed to string. | |
ibasic_string & | replace (const_iterator first, const_iterator last, const_pointer s, size_t n) |
Replace characters from 'first' to 'last' with 'n' characters from pointed to string. | |
ibasic_string & | replace (size_t position, size_t length_, size_t n, value_type c) |
Replace characters from 'position' of 'length' with 'n' copies of 'c'. | |
ibasic_string & | replace (const_iterator first, const_iterator last, size_t n, value_type c) |
Replace characters from 'first' of 'last' with 'n' copies of 'c'. | |
template<typename TIterator > | |
ibasic_string & | replace (const_iterator first, const_iterator last, TIterator first_replace, TIterator last_replace) |
Replace characters from 'first' of 'last' with characters from 'first_replace' to 'last_replace'. | |
int | compare (const ibasic_string &str) const |
Compare with string. | |
int | compare (size_t position, size_t length_, const ibasic_string &str) const |
Compare position / length with string. | |
int | compare (size_t position, size_t length_, const ibasic_string &str, size_t subposition, size_t sublength) const |
Compare position / length with string / subposition / sublength. | |
int | compare (const value_type *s) const |
Compare with C string. | |
int | compare (size_t position, size_t length_, const_pointer s) const |
Compare position / length with C string. | |
int | compare (size_t position, size_t length_, const_pointer s, size_t n) const |
Compare position / length with C string / n. | |
size_t | find_first_of (const ibasic_string< T > &str, size_t position=0) const |
Find first of any of content within the string. | |
size_t | find_first_of (const_pointer s, size_t position=0) const |
Find first of any of content within the string. | |
size_t | find_first_of (const_pointer s, size_t position, size_t n) const |
Find first of any of content within the string. | |
size_t | find_first_of (value_type c, size_t position=0) const |
Find first of character within the string. | |
size_t | find_last_of (const ibasic_string< T > &str, size_t position=npos) const |
Find last of any of content within the string. | |
size_t | find_last_of (const_pointer s, size_t position=npos) const |
Find last of any of content within the string. | |
size_t | find_last_of (const_pointer s, size_t position, size_t n) const |
Find last of any of content within the string. | |
size_t | find_last_of (value_type c, size_t position=npos) const |
Find last of character within the string. | |
size_t | find_first_not_of (const ibasic_string< T > &str, size_t position=0) const |
Find first not of any of content within the string. | |
size_t | find_first_not_of (const_pointer s, size_t position=0) const |
Find first not of any of content within the string. | |
size_t | find_first_not_of (const_pointer s, size_t position, size_t n) const |
Find first not of any of content within the string. | |
size_t | find_first_not_of (value_type c, size_t position=0) const |
Find first not of character within the string. | |
size_t | find_last_not_of (const ibasic_string< T > &str, size_t position=npos) const |
Find last not of any of content within the string. | |
size_t | find_last_not_of (const_pointer s, size_t position=npos) const |
Find last not of any of content within the string. | |
size_t | find_last_not_of (const_pointer s, size_t position, size_t n) const |
Find last not of any of content within the string. | |
ibasic_string & | operator+= (const ibasic_string &rhs) |
+= operator. | |
ibasic_string & | operator+= (const T *rhs) |
+= operator. | |
ibasic_string & | operator+= (T rhs) |
+= operator. | |
size_type | size () const |
Gets the current size of the string. | |
size_type | length () const |
Gets the current size of the string. | |
bool | empty () const |
Checks the 'empty' state of the string. | |
bool | full () const |
Checks the 'full' state of the string. | |
size_type | capacity () const |
Returns the capacity of the string. | |
size_type | max_size () const |
Returns the maximum possible size of the string. | |
size_t | available () const |
Returns the remaining capacity. | |
size_t | truncated () const |
Returns whether the string was truncated by the last operation. | |
Protected Member Functions | |
void | repair (T *p_buffer_) |
Fix the internal pointers after a low level memory copy. | |
void | initialise () |
Initialise the string. | |
Protected Attributes | |
bool | is_truncated |
Set to true if the operation truncated the string. | |
size_type | current_size |
The current number of elements in the string. | |
const size_type | CAPACITY |
The maximum number of elements in the string. |
Detailed Description
template<const size_t MAX_SIZE_>
class etl::wstring< MAX_SIZE_ >
A wstring implementation that uses a fixed size buffer.
- Template Parameters:
-
MAX_SIZE_ The maximum number of elements that can be stored.
Definition at line 52 of file wstring.h.
Constructor & Destructor Documentation
wstring | ( | const etl::wstring< MAX_SIZE_ > & | other ) |
wstring | ( | const etl::wstring< MAX_SIZE_ > & | other, |
size_t | position, | ||
size_t | length_ = npos |
||
) |
wstring | ( | const value_type * | text ) |
wstring | ( | const value_type * | text, |
size_t | count | ||
) |
wstring | ( | size_t | count, |
value_type | c | ||
) |
wstring | ( | TIterator | first, |
TIterator | last | ||
) |
Member Function Documentation
ibasic_string& append | ( | const ibasic_string< T > & | str ) | [inherited] |
Appends to the string.
- Parameters:
-
str The string to append.
Definition at line 652 of file basic_string.h.
ibasic_string& append | ( | const ibasic_string< T > & | str, |
size_t | subposition, | ||
size_t | sublength = npos |
||
) | [inherited] |
Appends to the string.
- Parameters:
-
str The string to append. subposition The position in str. sublength The number of characters.
Definition at line 664 of file basic_string.h.
ibasic_string& append | ( | const T * | str ) | [inherited] |
Appends to the string.
- Parameters:
-
str The string to append.
Definition at line 676 of file basic_string.h.
ibasic_string& append | ( | const T * | str, |
size_t | n | ||
) | [inherited] |
Appends to the string.
- Parameters:
-
str The string to append. n The number of characters.
Definition at line 687 of file basic_string.h.
ibasic_string& append | ( | size_t | n, |
T | c | ||
) | [inherited] |
Appends to the string.
- Parameters:
-
n The number of characters. c The character.
Definition at line 698 of file basic_string.h.
ibasic_string& append | ( | TIterator | first, |
TIterator | last | ||
) | [inherited] |
Appends to the string.
- Parameters:
-
first The first of the characters to append. last The last + 1 character to add.
Definition at line 710 of file basic_string.h.
void assign | ( | const etl::ibasic_string< T > & | other ) | [inherited] |
Assigns values to the string.
Truncates if the string does not have enough free space.
- Parameters:
-
other The other string.
Definition at line 506 of file basic_string.h.
void assign | ( | TIterator | first, |
TIterator | last | ||
) | [inherited] |
Assigns values to the string.
If asserts or exceptions are enabled, emits string_iterator if the iterators are reversed. Truncates if the string does not have enough free space.
- Parameters:
-
first The iterator to the first element. last The iterator to the last element + 1.
Definition at line 576 of file basic_string.h.
void assign | ( | size_t | n, |
T | value | ||
) | [inherited] |
Assigns values to the string.
Truncates if the string does not have enough free space.
- Parameters:
-
n The number of elements to add. value The value to insert for each element.
Definition at line 599 of file basic_string.h.
void assign | ( | const etl::ibasic_string< T > & | other, |
size_t | subposition, | ||
size_t | sublength | ||
) | [inherited] |
Assigns values to the string.
Truncates if the string does not have enough free space.
- Parameters:
-
other The other string. subposition The position to start from. sublength The length to copy.
Definition at line 519 of file basic_string.h.
void assign | ( | const_pointer | other ) | [inherited] |
Assigns values to the string.
Truncates if the string does not have enough free space.
- Parameters:
-
other The other string.
Definition at line 536 of file basic_string.h.
void assign | ( | const_pointer | other, |
size_t | length_ | ||
) | [inherited] |
Assigns values to the string.
Truncates if the string does not have enough free space.
- Parameters:
-
other The other string. length The length to copy.
Definition at line 556 of file basic_string.h.
const_reference at | ( | size_t | i ) | const [inherited] |
Returns a const reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::string_out_of_bounds if the index is out of range.
- Parameters:
-
i The index.
- Returns:
- A const reference to the value at index 'i'
Definition at line 441 of file basic_string.h.
reference at | ( | size_t | i ) | [inherited] |
Returns a reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::string_out_of_bounds if the index is out of range.
- Parameters:
-
i The index.
- Returns:
- A reference to the value at index 'i'
Definition at line 429 of file basic_string.h.
size_t available | ( | ) | const [inherited] |
Returns the remaining capacity.
- Returns:
- The remaining capacity.
Definition at line 212 of file basic_string.h.
const_reference back | ( | ) | const [inherited] |
Returns a const reference to the last element.
- Returns:
- A const reference to the last element.
Definition at line 478 of file basic_string.h.
reference back | ( | ) | [inherited] |
Returns a reference to the last element.
- Returns:
- A reference to the last element.
Definition at line 469 of file basic_string.h.
iterator begin | ( | ) | [inherited] |
Returns an iterator to the beginning of the string.
- Returns:
- An iterator to the beginning of the string.
Definition at line 270 of file basic_string.h.
const_iterator begin | ( | ) | const [inherited] |
Returns a const_iterator to the beginning of the string.
- Returns:
- A const iterator to the beginning of the string.
Definition at line 279 of file basic_string.h.
const_pointer c_str | ( | ) | const [inherited] |
Return a pointer to a C string.
Definition at line 1016 of file basic_string.h.
size_type capacity | ( | ) | const [inherited] |
Returns the capacity of the string.
- Returns:
- The capacity of the string.
Definition at line 194 of file basic_string.h.
const_iterator cbegin | ( | ) | const [inherited] |
Returns a const_iterator to the beginning of the string.
- Returns:
- A const iterator to the beginning of the string.
Definition at line 306 of file basic_string.h.
const_iterator cend | ( | ) | const [inherited] |
Returns a const_iterator to the end of the string.
- Returns:
- A const iterator to the end of the string.
Definition at line 315 of file basic_string.h.
void clear | ( | ) | [inherited] |
Clears the string.
Definition at line 613 of file basic_string.h.
int compare | ( | const ibasic_string< T > & | str ) | const [inherited] |
Compare with string.
Definition at line 1459 of file basic_string.h.
int compare | ( | size_t | position, |
size_t | length_, | ||
const ibasic_string< T > & | str | ||
) | const [inherited] |
Compare position / length with string.
Definition at line 1470 of file basic_string.h.
int compare | ( | size_t | position, |
size_t | length_, | ||
const ibasic_string< T > & | str, | ||
size_t | subposition, | ||
size_t | sublength | ||
) | const [inherited] |
Compare position / length with string / subposition / sublength.
Definition at line 1486 of file basic_string.h.
int compare | ( | const value_type * | s ) | const [inherited] |
Compare with C string.
Definition at line 1504 of file basic_string.h.
int compare | ( | size_t | position, |
size_t | length_, | ||
const_pointer | s | ||
) | const [inherited] |
Compare position / length with C string.
Definition at line 1515 of file basic_string.h.
int compare | ( | size_t | position, |
size_t | length_, | ||
const_pointer | s, | ||
size_t | n | ||
) | const [inherited] |
Compare position / length with C string / n.
Definition at line 1526 of file basic_string.h.
size_t copy | ( | pointer | s, |
size_t | len, | ||
size_t | pos = 0 |
||
) | [inherited] |
Copies a portion of a string.
- Parameters:
-
s Pointer to the string to copy. len The number of characters to copy. pos The position to start copying from.
Definition at line 1027 of file basic_string.h.
const_reverse_iterator crbegin | ( | ) | const [inherited] |
Returns a const reverse iterator to the reverse beginning of the string.
- Returns:
- Const reverse iterator to the reverse beginning of the string.
Definition at line 360 of file basic_string.h.
const_reverse_iterator crend | ( | ) | const [inherited] |
Returns a const reverse iterator to the end + 1 of the string.
- Returns:
- Const reverse iterator to the end + 1 of the string.
Definition at line 369 of file basic_string.h.
const_pointer data | ( | ) | const [inherited] |
Returns a const pointer to the beginning of the string data.
- Returns:
- A const pointer to the beginning of the string data.
Definition at line 496 of file basic_string.h.
pointer data | ( | ) | [inherited] |
Returns a pointer to the beginning of the string data.
- Returns:
- A pointer to the beginning of the string data.
Definition at line 487 of file basic_string.h.
bool empty | ( | ) | const [inherited] |
Checks the 'empty' state of the string.
- Returns:
- true if empty.
Definition at line 176 of file basic_string.h.
const_iterator end | ( | ) | const [inherited] |
Returns a const_iterator to the end of the string.
- Returns:
- A const iterator to the end of the string.
Definition at line 297 of file basic_string.h.
iterator end | ( | ) | [inherited] |
Returns an iterator to the end of the string.
- Returns:
- An iterator to the end of the string.
Definition at line 288 of file basic_string.h.
iterator erase | ( | iterator | first, |
iterator | last | ||
) | [inherited] |
Erases a range of elements.
The range includes all the elements between first and last, including the element pointed by first, but not the one pointed by last.
- Parameters:
-
first Iterator to the first element. last Iterator to the last element.
- Returns:
- An iterator pointing to the element that followed the erased element.
Definition at line 1002 of file basic_string.h.
etl::ibasic_string<T>& erase | ( | size_t | position, |
size_t | length_ = npos |
||
) | [inherited] |
Erases a sequence.
- Parameters:
-
position Position to start from. length Number of characters.
- Returns:
- A refernce to this string.
Definition at line 971 of file basic_string.h.
iterator erase | ( | iterator | i_element ) | [inherited] |
Erases an element.
- Parameters:
-
i_element Iterator to the element.
- Returns:
- An iterator pointing to the element that followed the erased element.
Definition at line 986 of file basic_string.h.
size_t find | ( | const ibasic_string< T > & | str, |
size_t | pos = 0 |
||
) | const [inherited] |
Find content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1044 of file basic_string.h.
size_t find | ( | const_pointer | s, |
size_t | pos = 0 |
||
) | const [inherited] |
Find content within the string.
- Parameters:
-
s Pointer to the content to find pos The position to start searching from.
Definition at line 1068 of file basic_string.h.
size_t find | ( | const_pointer | s, |
size_t | pos, | ||
size_t | n | ||
) | const [inherited] |
Find content within the string.
- Parameters:
-
s Pointer to the content to find pos The position to start searching from. n The number of characters to search for.
Definition at line 1095 of file basic_string.h.
size_t find | ( | T | c, |
size_t | position = 0 |
||
) | const [inherited] |
Find character within the string.
- Parameters:
-
c The character to find. position The position to start searching from.
Definition at line 1121 of file basic_string.h.
size_t find_first_not_of | ( | value_type | c, |
size_t | position = 0 |
||
) | const [inherited] |
Find first not of character within the string.
- Parameters:
-
c The character to not find pos The position to start searching from.
Definition at line 1741 of file basic_string.h.
size_t find_first_not_of | ( | const ibasic_string< T > & | str, |
size_t | position = 0 |
||
) | const [inherited] |
Find first not of any of content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1689 of file basic_string.h.
size_t find_first_not_of | ( | const_pointer | s, |
size_t | position = 0 |
||
) | const [inherited] |
Find first not of any of content within the string.
- Parameters:
-
s Pointer to the content to not find pos The position to start searching from.
Definition at line 1699 of file basic_string.h.
size_t find_first_not_of | ( | const_pointer | s, |
size_t | position, | ||
size_t | n | ||
) | const [inherited] |
Find first not of any of content within the string.
- Parameters:
-
s Pointer to the content to not find pos The position to start searching from. n The number of characters to search for.
Definition at line 1710 of file basic_string.h.
size_t find_first_of | ( | value_type | c, |
size_t | position = 0 |
||
) | const [inherited] |
Find first of character within the string.
- Parameters:
-
c The character to find pos The position to start searching from.
Definition at line 1584 of file basic_string.h.
size_t find_first_of | ( | const ibasic_string< T > & | str, |
size_t | position = 0 |
||
) | const [inherited] |
Find first of any of content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1539 of file basic_string.h.
size_t find_first_of | ( | const_pointer | s, |
size_t | position = 0 |
||
) | const [inherited] |
Find first of any of content within the string.
- Parameters:
-
s Pointer to the content to find pos The position to start searching from.
Definition at line 1549 of file basic_string.h.
size_t find_first_of | ( | const_pointer | s, |
size_t | position, | ||
size_t | n | ||
) | const [inherited] |
Find first of any of content within the string.
- Parameters:
-
s Pointer to the content to find pos The position to start searching from. n The number of characters to search for.
Definition at line 1560 of file basic_string.h.
size_t find_last_not_of | ( | const ibasic_string< T > & | str, |
size_t | position = npos |
||
) | const [inherited] |
Find last not of any of content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1762 of file basic_string.h.
size_t find_last_not_of | ( | const_pointer | s, |
size_t | position = npos |
||
) | const [inherited] |
Find last not of any of content within the string.
- Parameters:
-
s The pointer to the content to find pos The position to start searching from.
Definition at line 1772 of file basic_string.h.
size_t find_last_not_of | ( | const_pointer | s, |
size_t | position, | ||
size_t | n | ||
) | const [inherited] |
Find last not of any of content within the string.
- Parameters:
-
s The pointer to the content to find pos The position to start searching from. n The number of characters to use.
Definition at line 1783 of file basic_string.h.
size_t find_last_of | ( | value_type | c, |
size_t | position = npos |
||
) | const [inherited] |
Find last of character within the string.
- Parameters:
-
c The character to find pos The position to start searching from.
Definition at line 1659 of file basic_string.h.
size_t find_last_of | ( | const ibasic_string< T > & | str, |
size_t | position = npos |
||
) | const [inherited] |
Find last of any of content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1605 of file basic_string.h.
size_t find_last_of | ( | const_pointer | s, |
size_t | position = npos |
||
) | const [inherited] |
Find last of any of content within the string.
- Parameters:
-
s Pointer to the content to find pos The position to start searching from.
Definition at line 1615 of file basic_string.h.
size_t find_last_of | ( | const_pointer | s, |
size_t | position, | ||
size_t | n | ||
) | const [inherited] |
Find last of any of content within the string.
- Parameters:
-
s Pointer to the content to find pos The position to start searching from. n The number of characters to search for.
Definition at line 1626 of file basic_string.h.
reference front | ( | ) | [inherited] |
Returns a reference to the first element.
- Returns:
- A reference to the first element.
Definition at line 451 of file basic_string.h.
const_reference front | ( | ) | const [inherited] |
Returns a const reference to the first element.
- Returns:
- A const reference to the first element.
Definition at line 460 of file basic_string.h.
bool full | ( | ) | const [inherited] |
Checks the 'full' state of the string.
- Returns:
- true if full.
Definition at line 185 of file basic_string.h.
void initialise | ( | ) | [protected, inherited] |
Initialise the string.
Definition at line 1913 of file basic_string.h.
etl::ibasic_string<T>& insert | ( | size_t | position, |
size_t | n, | ||
value_type | c | ||
) | [inherited] |
Insert n characters of c at position.
- Parameters:
-
position The position to insert before. n The number of characters to insert. c The character to insert.
Definition at line 957 of file basic_string.h.
etl::ibasic_string<T>& insert | ( | size_t | position, |
const etl::ibasic_string< T > & | str | ||
) | [inherited] |
Inserts a string at the specified position.
- Parameters:
-
position The position to insert before. str The string to insert.
Definition at line 895 of file basic_string.h.
iterator insert | ( | const_iterator | position, |
T | value | ||
) | [inherited] |
Inserts a value to the string.
- Parameters:
-
position The position to insert before. value The value to insert.
Definition at line 721 of file basic_string.h.
etl::ibasic_string<T>& insert | ( | size_t | position, |
const_pointer | s | ||
) | [inherited] |
Inserts a string at the specified position from pointer.
- Parameters:
-
position The position to insert before. s The string to insert.
Definition at line 929 of file basic_string.h.
etl::ibasic_string<T>& insert | ( | size_t | position, |
const_pointer | s, | ||
size_t | n | ||
) | [inherited] |
Inserts a string at the specified position from pointer for n characters.
- Parameters:
-
position The position to insert before. s The string to insert. n The number of characters to insert.
Definition at line 943 of file basic_string.h.
void insert | ( | const_iterator | position, |
size_t | n, | ||
T | value | ||
) | [inherited] |
Inserts 'n' values to the string.
- Parameters:
-
position The position to insert before. n The number of elements to add. value The value to insert.
Definition at line 769 of file basic_string.h.
void insert | ( | iterator | position, |
TIterator | first, | ||
TIterator | last | ||
) | [inherited] |
Inserts a range of values to the string.
If asserts or exceptions are enabled, emits string_full if the string does not have enough free space.
- Parameters:
-
position The position to insert before. first The first element to add. last The last + 1 element to add.
Definition at line 830 of file basic_string.h.
etl::ibasic_string<T>& insert | ( | size_t | position, |
const etl::ibasic_string< T > & | str, | ||
size_t | subposition, | ||
size_t | sublength | ||
) | [inherited] |
Inserts a string at the specified position from subposition for sublength.
- Parameters:
-
position The position to insert before. str The string to insert. subposition The subposition to start from. sublength The number of characters to insert.
Definition at line 910 of file basic_string.h.
size_type length | ( | ) | const [inherited] |
Gets the current size of the string.
- Returns:
- The current size of the string.
Definition at line 167 of file basic_string.h.
size_type max_size | ( | ) | const [inherited] |
Returns the maximum possible size of the string.
- Returns:
- The maximum size of the string.
Definition at line 203 of file basic_string.h.
ibasic_string& operator+= | ( | const T * | rhs ) | [inherited] |
+= operator.
Definition at line 1875 of file basic_string.h.
ibasic_string& operator+= | ( | const ibasic_string< T > & | rhs ) | [inherited] |
+= operator.
Definition at line 1862 of file basic_string.h.
ibasic_string& operator+= | ( | T | rhs ) | [inherited] |
+= operator.
Definition at line 1885 of file basic_string.h.
const_reference operator[] | ( | size_t | i ) | const [inherited] |
Returns a const reference to the value at index 'i'.
- Parameters:
-
i The index.
- Returns:
- A const reference to the value at index 'i'
Definition at line 418 of file basic_string.h.
reference operator[] | ( | size_t | i ) | [inherited] |
Returns a reference to the value at index 'i'.
- Parameters:
-
i The index.
- Returns:
- A reference to the value at index 'i'
Definition at line 408 of file basic_string.h.
void pop_back | ( | ) | [inherited] |
Removes an element from the end of the string.
Does nothing if the string is empty.
Definition at line 640 of file basic_string.h.
void push_back | ( | T | value ) | [inherited] |
Inserts a value at the end of the string.
Sets 'truncated' if the string is already full.
- Parameters:
-
value The value to add.
Definition at line 623 of file basic_string.h.
const_reverse_iterator rbegin | ( | ) | const [inherited] |
Returns a const reverse iterator to the reverse beginning of the string.
- Returns:
- Const iterator to the reverse beginning of the string.
Definition at line 333 of file basic_string.h.
reverse_iterator rbegin | ( | ) | [inherited] |
Returns an reverse iterator to the reverse beginning of the string.
- Returns:
- Iterator to the reverse beginning of the string.
Definition at line 324 of file basic_string.h.
const_reverse_iterator rend | ( | ) | const [inherited] |
Returns a const reverse iterator to the end + 1 of the string.
- Returns:
- Const reverse iterator to the end + 1 of the string.
Definition at line 351 of file basic_string.h.
reverse_iterator rend | ( | ) | [inherited] |
Returns a reverse iterator to the end + 1 of the string.
- Returns:
- Reverse iterator to the end + 1 of the string.
Definition at line 342 of file basic_string.h.
void repair | ( | ) | [virtual] |
Fix the internal pointers after a low level memory copy.
Implements ibasic_string< T >.
void repair | ( | T * | p_buffer_ ) | [protected, inherited] |
Fix the internal pointers after a low level memory copy.
Definition at line 1922 of file basic_string.h.
ibasic_string& replace | ( | const_iterator | first, |
const_iterator | last, | ||
const_pointer | s | ||
) | [inherited] |
Replace characters from 'first' 'last' with pointed to string.
Definition at line 1348 of file basic_string.h.
ibasic_string& replace | ( | const_iterator | first, |
const_iterator | last, | ||
const_pointer | s, | ||
size_t | n | ||
) | [inherited] |
Replace characters from 'first' to 'last' with 'n' characters from pointed to string.
Definition at line 1385 of file basic_string.h.
ibasic_string& replace | ( | size_t | position, |
size_t | length_, | ||
size_t | n, | ||
value_type | c | ||
) | [inherited] |
Replace characters from 'position' of 'length' with 'n' copies of 'c'.
Definition at line 1403 of file basic_string.h.
ibasic_string& replace | ( | const_iterator | first, |
const_iterator | last, | ||
const ibasic_string< T > & | str | ||
) | [inherited] |
Replace characters from 'first' to one before 'last' with 'str'.
- Parameters:
-
first The position to start from. last The one after the position to end at. str The string to replace it with.
Definition at line 1290 of file basic_string.h.
ibasic_string& replace | ( | const_iterator | first, |
const_iterator | last, | ||
size_t | n, | ||
value_type | c | ||
) | [inherited] |
Replace characters from 'first' of 'last' with 'n' copies of 'c'.
Definition at line 1422 of file basic_string.h.
ibasic_string& replace | ( | size_t | position, |
size_t | length_, | ||
const ibasic_string< T > & | str, | ||
size_t | subposition, | ||
size_t | sublength | ||
) | [inherited] |
Replace characters from 'position' of 'length' with 'str' from 'subpsotion' of 'sublength'.
Definition at line 1308 of file basic_string.h.
ibasic_string& replace | ( | size_t | position, |
size_t | length_, | ||
const_pointer | s, | ||
size_t | n | ||
) | [inherited] |
Replace characters from 'position' of 'length' with 'n' characters from pointed to string.
Definition at line 1366 of file basic_string.h.
ibasic_string& replace | ( | const_iterator | first, |
const_iterator | last, | ||
TIterator | first_replace, | ||
TIterator | last_replace | ||
) | [inherited] |
Replace characters from 'first' of 'last' with characters from 'first_replace' to 'last_replace'.
Definition at line 1441 of file basic_string.h.
ibasic_string& replace | ( | size_t | position, |
size_t | length_, | ||
const ibasic_string< T > & | str | ||
) | [inherited] |
Replace 'length' characters from 'position' with 'str'.
- Parameters:
-
position The position to start from. length The number of characters to replace. str The string to replace it with.
Definition at line 1268 of file basic_string.h.
ibasic_string& replace | ( | size_t | position, |
size_t | length_, | ||
const_pointer | s | ||
) | [inherited] |
Replace characters from 'position' of 'length' with pointed to string.
Definition at line 1329 of file basic_string.h.
void resize | ( | size_t | new_size ) | [inherited] |
Resizes the string.
If asserts or exceptions are enabled and the new size is larger than the
- Parameters:
-
new_size The new size.
Definition at line 379 of file basic_string.h.
void resize | ( | size_t | new_size, |
T | value | ||
) | [inherited] |
Resizes the string.
- Parameters:
-
new_size The new size. value The value to fill new elements with. Default = default constructed value.
Definition at line 389 of file basic_string.h.
size_t rfind | ( | const ibasic_string< T > & | str, |
size_t | position = npos |
||
) | const [inherited] |
Find content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1140 of file basic_string.h.
size_t rfind | ( | const_pointer | s, |
size_t | position = npos |
||
) | const [inherited] |
Find content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1171 of file basic_string.h.
size_t rfind | ( | const_pointer | s, |
size_t | position, | ||
size_t | length_ | ||
) | const [inherited] |
Find content within the string.
- Parameters:
-
str The content to find pos The position to start searching from.
Definition at line 1207 of file basic_string.h.
size_t rfind | ( | T | c, |
size_t | position = npos |
||
) | const [inherited] |
Find character within the string.
- Parameters:
-
c The character to find pos The position to start searching from.
Definition at line 1241 of file basic_string.h.
size_type size | ( | ) | const [inherited] |
Gets the current size of the string.
- Returns:
- The current size of the string.
Definition at line 158 of file basic_string.h.
etl::wstring<MAX_SIZE_> substr | ( | size_t | position = 0 , |
size_t | length_ = npos |
||
) | const |
size_t truncated | ( | ) | const [inherited] |
Returns whether the string was truncated by the last operation.
- Returns:
- Whether the string was truncated by the last operation.
Definition at line 221 of file basic_string.h.
Field Documentation
const size_type CAPACITY [protected, inherited] |
The maximum number of elements in the string.
Definition at line 240 of file basic_string.h.
size_type current_size [protected, inherited] |
The current number of elements in the string.
Definition at line 239 of file basic_string.h.
bool is_truncated [protected, inherited] |
Set to true if the operation truncated the string.
Definition at line 238 of file basic_string.h.
Generated on Tue Jul 12 2022 14:05:57 by
