Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::ibasic_string< T > Class Template Reference

#include <basic_string.h>

Public Types

typedef ibasic_string< T > interface_type
typedef T value_type
typedef T & reference
typedef const T & const_reference
typedef T * pointer
typedef const T * const_pointer
typedef T * iterator
typedef const T * const_iterator
typedef ETL_OR_STD::reverse_iterator< iterator > reverse_iterator
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
typedef etl::iterator_traits< iterator >::difference_type difference_type
Public Types inherited from etl::string_base
typedef size_t size_type
Public Types inherited from etl::private_basic_string::string_base_statics< T >
typedef size_t size_type

Public Member Functions

iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
const_reverse_iterator crbegin () const
const_reverse_iterator crend () const
void resize (size_type new_size)
void resize (size_type new_size, T value)
template<typename TOperation>
void resize_and_overwrite (size_type new_size, TOperation operation)
 Resizes the string and overwrites to data using the operation.
void uninitialized_resize (size_type new_size)
void fill (T value)
reference operator[] (size_type i)
const_reference operator[] (size_type i) const
reference at (size_type i)
const_reference at (size_type i) const
reference front ()
const_reference front () const
reference back ()
const_reference back () const
pointer data ()
ETL_CONSTEXPR const_pointer data () const
pointer data_end ()
const_pointer data_end () const
void assign (const etl::ibasic_string< T > &other)
void assign (const etl::ibasic_string< T > &other, size_type subposition, size_type sublength)
template<typename TIterator>
void assign (TIterator first, TIterator last)
void assign (const_pointer str)
void assign (const_pointer str, size_type n)
template<typename TOtherTraits>
void assign (const etl::basic_string_view< T, TOtherTraits > &view)
 Assigns values to the string from a view.
void assign (size_type n, T c)
void clear ()
 Clears the string.
void push_back (T value)
void pop_back ()
ibasic_stringappend (const ibasic_string &str)
ibasic_stringappend (const ibasic_string &str, size_type subposition, size_type sublength=npos)
template<class TIterator>
ibasic_stringappend (TIterator first, TIterator last)
ibasic_stringappend (const_pointer str)
ibasic_stringappend (const_pointer str, size_type n)
template<typename TOtherTraits>
ibasic_stringappend (const etl::basic_string_view< T, TOtherTraits > &view)
ibasic_stringappend (size_type n, T c)
iterator insert (const_iterator position, T value)
iterator insert (const_iterator position, size_type n, T value)
template<typename TIterator>
iterator insert (const_iterator position, TIterator first, TIterator last)
template<typename TOtherTraits>
iterator insert (const_iterator position, const etl::basic_string_view< T, TOtherTraits > &view)
etl::ibasic_string< T > & insert (size_type position, const etl::ibasic_string< T > &str)
template<typename TOtherTraits>
etl::ibasic_string< T > & insert (size_type position, const etl::basic_string_view< T, TOtherTraits > &view)
etl::ibasic_string< T > & insert (size_type position, const etl::ibasic_string< T > &str, size_type subposition, size_type sublength)
template<typename TOtherTraits>
etl::ibasic_string< T > & insert (size_type position, const etl::basic_string_view< T, TOtherTraits > &view, size_type subposition, size_type sublength)
etl::ibasic_string< T > & insert (size_type position, const_pointer s)
etl::ibasic_string< T > & insert (size_type position, const_pointer s, size_type n)
etl::ibasic_string< T > & insert (size_type position, size_type n, value_type c)
etl::ibasic_string< T > & erase (size_type position, size_type length_=npos)
iterator erase (iterator i_element)
iterator erase (const_iterator i_element)
iterator erase (const_iterator first, const_iterator last)
const_pointer c_str () const
 Return a pointer to a C string.
size_type copy (pointer dest, size_type count, size_type pos=0) const
size_type find (const ibasic_string< T > &str, size_type pos=0) const
template<typename TOtherTraits>
size_type find (const etl::basic_string_view< T, TOtherTraits > &view, size_type pos=0) const
size_type find (const_pointer s, size_type pos=0) const
size_type find (const_pointer s, size_type pos, size_type n) const
size_type find (T c, size_type position=0) const
size_type rfind (const ibasic_string< T > &str, size_type position=npos) const
template<typename TOtherTraits>
size_type rfind (const etl::basic_string_view< T, TOtherTraits > &view, size_type pos=0) const
size_type rfind (const_pointer s, size_type position=npos) const
size_type rfind (const_pointer s, size_type position, size_type length_) const
size_type rfind (T c, size_type position=npos) const
bool contains (const etl::ibasic_string< T > &str) const
 Checks that the string is within this string.
template<typename TOtherTraits>
bool contains (const etl::basic_string_view< T, TOtherTraits > &view) const
 Checks that the view is within this string.
bool contains (const_pointer s) const
 Checks that text is within this string.
bool contains (value_type c) const
 Checks that character is within this string.
bool starts_with (const etl::ibasic_string< T > &str) const
 Checks that the string is the start of this string.
template<typename TOtherTraits>
bool starts_with (const etl::basic_string_view< T, TOtherTraits > &view) const
 Checks that the view is the start of this string.
bool starts_with (const_pointer s) const
 Checks that the string is the start of this string.
bool starts_with (value_type c) const
 Checks that the character is the start of this string.
bool ends_with (const etl::ibasic_string< T > &str) const
 Checks that the string is the end of this string.
template<typename TOtherTraits>
bool ends_with (const etl::basic_string_view< T, TOtherTraits > &view) const
 Checks that the view is the end of this string.
bool ends_with (const_pointer s) const
 Checks that the string is the end of this string.
bool ends_with (value_type c) const
 Checks that the character is the end of this string.
ibasic_stringreplace (size_type position, size_type length_, const ibasic_string &str)
template<typename TOtherTraits>
ibasic_stringreplace (size_type position, size_type length_, const etl::basic_string_view< T, TOtherTraits > &view)
ibasic_stringreplace (const_iterator first, const_iterator last, const ibasic_string &str)
template<typename TOtherTraits>
ibasic_stringreplace (const_iterator first, const_iterator last, const etl::basic_string_view< T, TOtherTraits > &view)
ibasic_stringreplace (size_type position, size_type length_, const ibasic_string &str, size_type subposition, size_type sublength)
 Replace characters from 'position' of 'length' with 'str' from 'subposition' of 'sublength'.
template<typename TOtherTraits>
ibasic_stringreplace (size_type position, size_type length_, const etl::basic_string_view< T, TOtherTraits > &view, size_type subposition, size_type sublength)
 Replace characters from 'position' of 'length' with 'view' from 'subposition' of 'sublength'.
ibasic_stringreplace (size_type position, size_type length_, const_pointer s)
 Replace characters from 'position' of 'length' with pointed to string.
ibasic_stringreplace (const_iterator first, const_iterator last, const_pointer s, size_type n)
template<typename TIterator>
etl::enable_if< etl::is_same< TIterator, const_pointer >::value, ibasic_string >::typereplace (const_iterator first, const_iterator last, TIterator s)
 Replace characters from 'first' to 'last' with pointed to string.
template<size_t Size>
ibasic_stringreplace (const_iterator first, const_iterator last, const value_type(&literal)[Size])
 Replace characters from 'first' 'last' with pointed to literal string.
ibasic_stringreplace (size_type position, size_type length_, const_pointer s, size_type n)
 Replace characters from 'position' of 'length' with 'n' characters from pointed to string.
ibasic_stringreplace (size_type position, size_type length_, size_type n, value_type c)
 Replace characters from 'position' of 'length' with 'n' copies of 'c'.
ibasic_stringreplace (const_iterator first, const_iterator last, size_type n, value_type c)
 Replace characters from 'first' of 'last' with 'n' copies of 'c'.
template<typename TIterator>
ibasic_stringreplace (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.
template<typename TOtherTraits>
int compare (const etl::basic_string_view< T, TOtherTraits > &view) const
 Compare with etl::basic_string_view.
int compare (size_type position, size_type length_, const ibasic_string &str) const
 Compare position / length with string.
template<typename TOtherTraits>
int compare (size_type position, size_type length_, const etl::basic_string_view< T, TOtherTraits > &view) const
 Compare position / length with etl::basic_string_view.
int compare (size_type position, size_type length_, const ibasic_string &str, size_type subposition, size_type sublength) const
 Compare position / length with string / subposition / sublength.
template<typename TOtherTraits>
int compare (size_type position, size_type length_, const etl::basic_string_view< T, TOtherTraits > &view, size_type subposition, size_type sublength) const
 Compare position / length with etl::basic_string_view. / subposition / sublength.
int compare (const value_type *s) const
 Compare with C string.
int compare (size_type position, size_type length_, const_pointer s) const
 Compare position / length with C string.
int compare (size_type position, size_type length_, const_pointer s, size_type n) const
 Compare position / length with C string / n.
size_type find_first_of (const ibasic_string< T > &str, size_type position=0) const
size_type find_first_of (const_pointer s, size_type position=0) const
template<typename TOtherTraits>
size_type find_first_of (const etl::basic_string_view< T, TOtherTraits > &view, size_type position=0) const
size_type find_first_of (const_pointer s, size_type position, size_type n) const
size_type find_first_of (value_type c, size_type position=0) const
size_type find_last_of (const ibasic_string< T > &str, size_type position=npos) const
size_type find_last_of (const_pointer s, size_type position=npos) const
template<typename TOtherTraits>
size_type find_last_of (const etl::basic_string_view< T, TOtherTraits > &view, size_type position=npos) const
size_type find_last_of (const_pointer s, size_type position, size_type n) const
size_type find_last_of (value_type c, size_type position=npos) const
size_type find_first_not_of (const ibasic_string< T > &str, size_type position=0) const
size_type find_first_not_of (const_pointer s, size_type position=0) const
template<typename TOtherTraits>
size_type find_first_not_of (const etl::basic_string_view< T, TOtherTraits > &view, size_type position=0) const
size_type find_first_not_of (const_pointer s, size_type position, size_type n) const
size_type find_first_not_of (value_type c, size_type position=0) const
size_type find_last_not_of (const ibasic_string< T > &str, size_type position=npos) const
size_type find_last_not_of (const_pointer s, size_type position=npos) const
template<typename TOtherTraits>
size_type find_last_not_of (const etl::basic_string_view< T, TOtherTraits > &view, size_type position=npos) const
size_type find_last_not_of (const_pointer s, size_type position, size_type n) const
size_type find_last_not_of (value_type c, size_type position=npos) const
ibasic_stringoperator= (const ibasic_string &rhs)
 Assignment operator.
ibasic_stringoperator= (const_pointer rhs)
 Assignment operator.
template<typename TOtherTraits>
ibasic_stringoperator= (const etl::basic_string_view< T, TOtherTraits > &view)
 Assignment operator.
ibasic_stringoperator+= (const ibasic_string &rhs)
 += operator.
template<typename TOtherTraits>
ibasic_stringoperator+= (const etl::basic_string_view< T, TOtherTraits > &rhs)
 += operator.
ibasic_stringoperator+= (const_pointer rhs)
 += operator.
ibasic_stringoperator+= (T rhs)
 += operator.
void initialize_free_space ()
 Clears the free space to string terminator value.
void trim_to_terminator ()
Public Member Functions inherited from etl::string_base
size_type size () const
size_type length () const
bool empty () const
bool full () const
size_type capacity () const
size_type max_size () const
size_type available () const
bool is_truncated () const
ETL_DEPRECATED bool truncated () const
void clear_truncated ()
 Clears the 'truncated' flag.
void set_secure ()
 Sets the 'secure' flag to the requested state.
bool is_secure () const
 Gets the 'secure' state flag.

Protected Member Functions

 ibasic_string (T *p_buffer_, size_type MAX_SIZE_)
 Constructor.
void initialise ()
 Initialise the string.
void repair_buffer (T *p_buffer_)
 Fix the internal pointers after a low level memory copy.
 ~ibasic_string ()
 Destructor.
iterator to_iterator (const_iterator itr) const
 Convert from const_iterator to iterator.
bool is_within_buffer (const_pointer ptr) const
 Checks if a pointer is within the buffer.
Protected Member Functions inherited from etl::string_base
 string_base (size_type max_size_)
 Constructor.
void set_truncated (bool status)
 Sets the 'truncated' flag.
 ~string_base ()
 Destructor.

Additional Inherited Members

Static Public Attributes inherited from etl::private_basic_string::string_base_statics< T >
static ETL_CONSTANT uint_least8_t IS_TRUNCATED = etl::bit<0>::value
static ETL_CONSTANT uint_least8_t CLEAR_AFTER_USE = etl::bit<1>::value
static ETL_CONSTANT size_type npos = etl::integral_limits<size_type>::max
Protected Attributes inherited from etl::string_base
size_type current_size
 The current number of elements in the string.
const size_type CAPACITY
 The maximum number of elements in the string.
etl::flags< uint_least8_t > flags

Detailed Description

template<typename T>
class etl::ibasic_string< T >

The base class for specifically sized strings. Can be used as a reference type for all strings containing a specific type.

Member Function Documentation

◆ append() [1/7]

template<typename T>
template<typename TOtherTraits>
ibasic_string & etl::ibasic_string< T >::append ( const etl::basic_string_view< T, TOtherTraits > & view)
inline

Appends to the string.

Parameters
viewAn etl::string_view.

◆ append() [2/7]

template<typename T>
ibasic_string & etl::ibasic_string< T >::append ( const ibasic_string< T > & str)
inline

Appends to the string.

Parameters
strThe string to append.

◆ append() [3/7]

template<typename T>
ibasic_string & etl::ibasic_string< T >::append ( const ibasic_string< T > & str,
size_type subposition,
size_type sublength = npos )
inline

Appends to the string.

Parameters
strThe string to append.
subpositionThe position in str.
sublengthThe number of characters.

◆ append() [4/7]

template<typename T>
ibasic_string & etl::ibasic_string< T >::append ( const_pointer str)
inline

Appends to the string.

Parameters
strThe string to append.

◆ append() [5/7]

template<typename T>
ibasic_string & etl::ibasic_string< T >::append ( const_pointer str,
size_type n )
inline

Appends to the string.

Parameters
strThe string to append.
nThe number of characters.

◆ append() [6/7]

template<typename T>
ibasic_string & etl::ibasic_string< T >::append ( size_type n,
T c )
inline

Appends to the string.

Parameters
nThe number of characters.
cThe character.

◆ append() [7/7]

template<typename T>
template<class TIterator>
ibasic_string & etl::ibasic_string< T >::append ( TIterator first,
TIterator last )
inline

Appends to the string.

Parameters
firstThe first of the characters to append.
lastThe last + 1 character to add.

◆ assign() [1/6]

template<typename T>
void etl::ibasic_string< T >::assign ( const etl::ibasic_string< T > & other)
inline

Assigns values to the string. Truncates if the string does not have enough free space.

Parameters
otherThe other string.

◆ assign() [2/6]

template<typename T>
void etl::ibasic_string< T >::assign ( const etl::ibasic_string< T > & other,
size_type subposition,
size_type sublength )
inline

Assigns values to the string. Truncates if the string does not have enough free space.

Parameters
otherThe other string.
subpositionThe position to start from.
sublengthThe length to copy.

◆ assign() [3/6]

template<typename T>
void etl::ibasic_string< T >::assign ( const_pointer str)
inline

Assigns values to the string. Truncates if the string does not have enough free space.

Parameters
otherThe other string.

◆ assign() [4/6]

template<typename T>
void etl::ibasic_string< T >::assign ( const_pointer str,
size_type n )
inline

Assigns values to the string. Truncates if the string does not have enough free space.

Parameters
otherThe other string.
lengthThe length to copy.

◆ assign() [5/6]

template<typename T>
void etl::ibasic_string< T >::assign ( size_type n,
T c )
inline

Assigns values to the string. Truncates if the string does not have enough free space.

Parameters
nThe number of elements to add.
valueThe value to insert for each element.

◆ assign() [6/6]

template<typename T>
template<typename TIterator>
void etl::ibasic_string< T >::assign ( TIterator first,
TIterator last )
inline

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
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ at() [1/2]

template<typename T>
reference etl::ibasic_string< T >::at ( size_type i)
inline

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
iThe index.
Returns
A reference to the value at index 'i'

◆ at() [2/2]

template<typename T>
const_reference etl::ibasic_string< T >::at ( size_type i) const
inline

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
iThe index.
Returns
A const reference to the value at index 'i'

◆ back() [1/2]

template<typename T>
reference etl::ibasic_string< T >::back ( )
inline

Returns a reference to the last element.

Returns
A reference to the last element.

◆ back() [2/2]

template<typename T>
const_reference etl::ibasic_string< T >::back ( ) const
inline

Returns a const reference to the last element.

Returns
A const reference to the last element.

◆ begin() [1/2]

template<typename T>
iterator etl::ibasic_string< T >::begin ( )
inline

Returns an iterator to the beginning of the string.

Returns
An iterator to the beginning of the string.

◆ begin() [2/2]

template<typename T>
const_iterator etl::ibasic_string< T >::begin ( ) const
inline

Returns a const_iterator to the beginning of the string.

Returns
A const iterator to the beginning of the string.

◆ cbegin()

template<typename T>
const_iterator etl::ibasic_string< T >::cbegin ( ) const
inline

Returns a const_iterator to the beginning of the string.

Returns
A const iterator to the beginning of the string.

◆ cend()

template<typename T>
const_iterator etl::ibasic_string< T >::cend ( ) const
inline

Returns a const_iterator to the end of the string.

Returns
A const iterator to the end of the string.

◆ copy()

template<typename T>
size_type etl::ibasic_string< T >::copy ( pointer dest,
size_type count,
size_type pos = 0 ) const
inline

Copies a portion of a string.

Parameters
destPointer to the destination buffer.
countThe number of characters to copy.
posThe position to start copying from.

◆ crbegin()

template<typename T>
const_reverse_iterator etl::ibasic_string< T >::crbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the string.

Returns
Const reverse iterator to the reverse beginning of the string.

◆ crend()

template<typename T>
const_reverse_iterator etl::ibasic_string< T >::crend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the string.

Returns
Const reverse iterator to the end + 1 of the string.

◆ data() [1/2]

template<typename T>
pointer etl::ibasic_string< T >::data ( )
inline

Returns a pointer to the beginning of the string data.

Returns
A pointer to the beginning of the string data.

◆ data() [2/2]

template<typename T>
ETL_CONSTEXPR const_pointer etl::ibasic_string< T >::data ( ) const
inline

Returns a const pointer to the beginning of the string data.

Returns
A const pointer to the beginning of the string data.

◆ data_end() [1/2]

template<typename T>
pointer etl::ibasic_string< T >::data_end ( )
inline

Returns a pointer to the beginning of the string data.

Returns
A pointer to the beginning of the string data.

◆ data_end() [2/2]

template<typename T>
const_pointer etl::ibasic_string< T >::data_end ( ) const
inline

Returns a const pointer to the beginning of the string data.

Returns
A const pointer to the beginning of the string data.

◆ end() [1/2]

template<typename T>
iterator etl::ibasic_string< T >::end ( )
inline

Returns an iterator to the end of the string.

Returns
An iterator to the end of the string.

◆ end() [2/2]

template<typename T>
const_iterator etl::ibasic_string< T >::end ( ) const
inline

Returns a const_iterator to the end of the string.

Returns
A const iterator to the end of the string.

◆ erase() [1/4]

template<typename T>
iterator etl::ibasic_string< T >::erase ( const_iterator first,
const_iterator last )
inline

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
firstIterator to the first element.
lastIterator to the last element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [2/4]

template<typename T>
iterator etl::ibasic_string< T >::erase ( const_iterator i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [3/4]

template<typename T>
iterator etl::ibasic_string< T >::erase ( iterator i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [4/4]

template<typename T>
etl::ibasic_string< T > & etl::ibasic_string< T >::erase ( size_type position,
size_type length_ = npos )
inline

Erases a sequence.

Parameters
positionPosition to start from.
lengthNumber of characters.
Returns
A reference to this string.

◆ fill()

template<typename T>
void etl::ibasic_string< T >::fill ( T value)
inline

Fills the string with the specified character. Does not change the string length.

Parameters
valueThe character used to fill the string.

◆ find() [1/5]

template<typename T>
template<typename TOtherTraits>
size_type etl::ibasic_string< T >::find ( const etl::basic_string_view< T, TOtherTraits > & view,
size_type pos = 0 ) const
inline

Find content within the string

Parameters
viewThe content to find
posThe position to start searching from.

◆ find() [2/5]

template<typename T>
size_type etl::ibasic_string< T >::find ( const ibasic_string< T > & str,
size_type pos = 0 ) const
inline

Find content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ find() [3/5]

template<typename T>
size_type etl::ibasic_string< T >::find ( const_pointer s,
size_type pos,
size_type n ) const
inline

Find content within the string

Parameters
sPointer to the content to find
posThe position to start searching from.
nThe number of characters to search for.

◆ find() [4/5]

template<typename T>
size_type etl::ibasic_string< T >::find ( const_pointer s,
size_type pos = 0 ) const
inline

Find content within the string

Parameters
sPointer to the content to find
posThe position to start searching from.

◆ find() [5/5]

template<typename T>
size_type etl::ibasic_string< T >::find ( T c,
size_type position = 0 ) const
inline

Find character within the string

Parameters
cThe character to find.
positionThe position to start searching from.

◆ find_first_not_of() [1/5]

template<typename T>
template<typename TOtherTraits>
size_type etl::ibasic_string< T >::find_first_not_of ( const etl::basic_string_view< T, TOtherTraits > & view,
size_type position = 0 ) const
inline

Find first not of any of content within the string

Parameters
viewThe content to find
posThe position to start searching from.

◆ find_first_not_of() [2/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_not_of ( const ibasic_string< T > & str,
size_type position = 0 ) const
inline

Find first not of any of content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ find_first_not_of() [3/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_not_of ( const_pointer s,
size_type position,
size_type n ) const
inline

Find first not of any of content within the string

Parameters
sPointer to the content to not find
posThe position to start searching from.
nThe number of characters to search for.

◆ find_first_not_of() [4/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_not_of ( const_pointer s,
size_type position = 0 ) const
inline

Find first not of any of content within the string

Parameters
sPointer to the content to not find
posThe position to start searching from.

◆ find_first_not_of() [5/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_not_of ( value_type c,
size_type position = 0 ) const
inline

Find first not of character within the string

Parameters
cThe character to not find
posThe position to start searching from.

◆ find_first_of() [1/5]

template<typename T>
template<typename TOtherTraits>
size_type etl::ibasic_string< T >::find_first_of ( const etl::basic_string_view< T, TOtherTraits > & view,
size_type position = 0 ) const
inline

Find first of any of content within the string

Parameters
viewThe content to find
posThe position to start searching from.

◆ find_first_of() [2/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_of ( const ibasic_string< T > & str,
size_type position = 0 ) const
inline

Find first of any of content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ find_first_of() [3/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_of ( const_pointer s,
size_type position,
size_type n ) const
inline

Find first of any of content within the string

Parameters
sPointer to the content to find
posThe position to start searching from.
nThe number of characters to search for.

◆ find_first_of() [4/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_of ( const_pointer s,
size_type position = 0 ) const
inline

Find first of any of content within the string

Parameters
sPointer to the content to find
posThe position to start searching from.

◆ find_first_of() [5/5]

template<typename T>
size_type etl::ibasic_string< T >::find_first_of ( value_type c,
size_type position = 0 ) const
inline

Find first of character within the string

Parameters
cThe character to find
posThe position to start searching from.

◆ find_last_not_of() [1/4]

template<typename T>
template<typename TOtherTraits>
size_type etl::ibasic_string< T >::find_last_not_of ( const etl::basic_string_view< T, TOtherTraits > & view,
size_type position = npos ) const
inline

Find last not of any of content within the string

Parameters
viewThe content to find
posThe position to start searching from.

◆ find_last_not_of() [2/4]

template<typename T>
size_type etl::ibasic_string< T >::find_last_not_of ( const ibasic_string< T > & str,
size_type position = npos ) const
inline

Find last not of any of content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ find_last_not_of() [3/4]

template<typename T>
size_type etl::ibasic_string< T >::find_last_not_of ( const_pointer s,
size_type position,
size_type n ) const
inline

Find last not of any of content within the string

Parameters
sThe pointer to the content to find
posThe position to start searching from.
nThe number of characters to use.

◆ find_last_not_of() [4/4]

template<typename T>
size_type etl::ibasic_string< T >::find_last_not_of ( const_pointer s,
size_type position = npos ) const
inline

Find last not of any of content within the string

Parameters
sThe pointer to the content to find
posThe position to start searching from.

◆ find_last_of() [1/5]

template<typename T>
template<typename TOtherTraits>
size_type etl::ibasic_string< T >::find_last_of ( const etl::basic_string_view< T, TOtherTraits > & view,
size_type position = npos ) const
inline

Find last of any of content within the string

Parameters
viewThe content to find
posThe position to start searching from.

◆ find_last_of() [2/5]

template<typename T>
size_type etl::ibasic_string< T >::find_last_of ( const ibasic_string< T > & str,
size_type position = npos ) const
inline

Find last of any of content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ find_last_of() [3/5]

template<typename T>
size_type etl::ibasic_string< T >::find_last_of ( const_pointer s,
size_type position,
size_type n ) const
inline

Find last of any of content within the string

Parameters
sPointer to the content to find
posThe position to start searching from.
nThe number of characters to search for.

◆ find_last_of() [4/5]

template<typename T>
size_type etl::ibasic_string< T >::find_last_of ( const_pointer s,
size_type position = npos ) const
inline

Find last of any of content within the string

Parameters
sPointer to the content to find
posThe position to start searching from.

◆ find_last_of() [5/5]

template<typename T>
size_type etl::ibasic_string< T >::find_last_of ( value_type c,
size_type position = npos ) const
inline

Find last of character within the string

Parameters
cThe character to find
posThe position to start searching from.

◆ front() [1/2]

template<typename T>
reference etl::ibasic_string< T >::front ( )
inline

Returns a reference to the first element.

Returns
A reference to the first element.

◆ front() [2/2]

template<typename T>
const_reference etl::ibasic_string< T >::front ( ) const
inline

Returns a const reference to the first element.

Returns
A const reference to the first element.

◆ insert() [1/11]

template<typename T>
template<typename TOtherTraits>
iterator etl::ibasic_string< T >::insert ( const_iterator position,
const etl::basic_string_view< T, TOtherTraits > & view )
inline

Inserts a view to the string. If asserts or exceptions are enabled, emits string_full if the string does not have enough free space.

Parameters
positionThe position to insert before.
viewThe view element to add.

◆ insert() [2/11]

template<typename T>
iterator etl::ibasic_string< T >::insert ( const_iterator position,
size_type n,
T value )
inline

Inserts 'n' values to the string.

Parameters
positionThe position to insert before.
nThe number of elements to add.
valueThe value to insert.

◆ insert() [3/11]

template<typename T>
iterator etl::ibasic_string< T >::insert ( const_iterator position,
T value )
inline

Inserts a value to the string.

Parameters
positionThe position to insert before.
valueThe value to insert.

◆ insert() [4/11]

template<typename T>
template<typename TIterator>
iterator etl::ibasic_string< T >::insert ( const_iterator position,
TIterator first,
TIterator last )
inline

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
positionThe position to insert before.
firstThe first element to add.
lastThe last + 1 element to add.

◆ insert() [5/11]

template<typename T>
template<typename TOtherTraits>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
const etl::basic_string_view< T, TOtherTraits > & view )
inline

Inserts a string at the specified position.

Parameters
positionThe position to insert before.
viewThe view to insert.

◆ insert() [6/11]

template<typename T>
template<typename TOtherTraits>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
const etl::basic_string_view< T, TOtherTraits > & view,
size_type subposition,
size_type sublength )
inline

Inserts a view at the specified position from subposition for sublength.

Parameters
positionThe position to insert before.
viewThe view to insert.
subpositionThe subposition to start from.
sublengthThe number of characters to insert.

◆ insert() [7/11]

template<typename T>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
const etl::ibasic_string< T > & str )
inline

Inserts a string at the specified position.

Parameters
positionThe position to insert before.
strThe string to insert.

◆ insert() [8/11]

template<typename T>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
const etl::ibasic_string< T > & str,
size_type subposition,
size_type sublength )
inline

Inserts a string at the specified position from subposition for sublength.

Parameters
positionThe position to insert before.
strThe string to insert.
subpositionThe subposition to start from.
sublengthThe number of characters to insert.

◆ insert() [9/11]

template<typename T>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
const_pointer s )
inline

Inserts a string at the specified position from pointer.

Parameters
positionThe position to insert before.
sThe string to insert.

◆ insert() [10/11]

template<typename T>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
const_pointer s,
size_type n )
inline

Inserts a string at the specified position from pointer for n characters.

Parameters
positionThe position to insert before.
sThe string to insert.
nThe number of characters to insert.

◆ insert() [11/11]

template<typename T>
etl::ibasic_string< T > & etl::ibasic_string< T >::insert ( size_type position,
size_type n,
value_type c )
inline

Insert n characters of c at position.

Parameters
positionThe position to insert before.
nThe number of characters to insert.
cThe character to insert.

◆ operator[]() [1/2]

template<typename T>
reference etl::ibasic_string< T >::operator[] ( size_type i)
inline

Returns a reference to the value at index 'i'

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ operator[]() [2/2]

template<typename T>
const_reference etl::ibasic_string< T >::operator[] ( size_type i) const
inline

Returns a const reference to the value at index 'i'

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ pop_back()

template<typename T>
void etl::ibasic_string< T >::pop_back ( )
inline

Removes an element from the end of the string. Does nothing if the string is empty.

◆ push_back()

template<typename T>
void etl::ibasic_string< T >::push_back ( T value)
inline

Inserts a value at the end of the string. Sets 'truncated' if the string is already full.

Parameters
valueThe value to add.

◆ rbegin() [1/2]

template<typename T>
reverse_iterator etl::ibasic_string< T >::rbegin ( )
inline

Returns an reverse iterator to the reverse beginning of the string.

Returns
Iterator to the reverse beginning of the string.

◆ rbegin() [2/2]

template<typename T>
const_reverse_iterator etl::ibasic_string< T >::rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the string.

Returns
Const iterator to the reverse beginning of the string.

◆ rend() [1/2]

template<typename T>
reverse_iterator etl::ibasic_string< T >::rend ( )
inline

Returns a reverse iterator to the end + 1 of the string.

Returns
Reverse iterator to the end + 1 of the string.

◆ rend() [2/2]

template<typename T>
const_reverse_iterator etl::ibasic_string< T >::rend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the string.

Returns
Const reverse iterator to the end + 1 of the string.

◆ replace() [1/5]

template<typename T>
template<typename TOtherTraits>
ibasic_string & etl::ibasic_string< T >::replace ( const_iterator first,
const_iterator last,
const etl::basic_string_view< T, TOtherTraits > & view )
inline

Replace characters from 'first' to one before 'last' with 'view'.

Parameters
firstThe position to start from.
lastThe one after the position to end at.
viewThe string view to replace it with.

◆ replace() [2/5]

template<typename T>
ibasic_string & etl::ibasic_string< T >::replace ( const_iterator first,
const_iterator last,
const ibasic_string< T > & str )
inline

Replace characters from 'first' to one before 'last' with 'str'.

Parameters
firstThe position to start from.
lastThe one after the position to end at.
strThe string to replace it with.

◆ replace() [3/5]

template<typename T>
ibasic_string & etl::ibasic_string< T >::replace ( const_iterator first,
const_iterator last,
const_pointer s,
size_type n )
inline

Replace characters in the range [first, last) with the first 'n' characters from the C string 's'.

Parameters
firstIterator to first character to replace.
lastIterator one past last character to replace.
sPointer to source character buffer (may be non-null terminated and may contain embedded nulls).
nNumber of characters from 's' to insert.

◆ replace() [4/5]

template<typename T>
template<typename TOtherTraits>
ibasic_string & etl::ibasic_string< T >::replace ( size_type position,
size_type length_,
const etl::basic_string_view< T, TOtherTraits > & view )
inline

Replace 'length' characters from 'position' with 'view'.

Parameters
positionThe position to start from.
lengthThe number of characters to replace.
viewThe string to replace it with.

◆ replace() [5/5]

template<typename T>
ibasic_string & etl::ibasic_string< T >::replace ( size_type position,
size_type length_,
const ibasic_string< T > & str )
inline

Replace 'length' characters from 'position' with 'str'.

Parameters
positionThe position to start from.
lengthThe number of characters to replace.
strThe string to replace it with.

◆ resize() [1/2]

template<typename T>
void etl::ibasic_string< T >::resize ( size_type new_size)
inline

Resizes the string. If asserts or exceptions are enabled and the new size is larger than the

Parameters
new_sizeThe new size.

◆ resize() [2/2]

template<typename T>
void etl::ibasic_string< T >::resize ( size_type new_size,
T value )
inline

Resizes the string.

Parameters
new_sizeThe new size.
valueThe value to fill new elements with. Default = default constructed value.

◆ rfind() [1/5]

template<typename T>
template<typename TOtherTraits>
size_type etl::ibasic_string< T >::rfind ( const etl::basic_string_view< T, TOtherTraits > & view,
size_type pos = 0 ) const
inline

Find content within the string

Parameters
viewThe content to find
posThe position to start searching from.

◆ rfind() [2/5]

template<typename T>
size_type etl::ibasic_string< T >::rfind ( const ibasic_string< T > & str,
size_type position = npos ) const
inline

Find content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ rfind() [3/5]

template<typename T>
size_type etl::ibasic_string< T >::rfind ( const_pointer s,
size_type position,
size_type length_ ) const
inline

Find content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ rfind() [4/5]

template<typename T>
size_type etl::ibasic_string< T >::rfind ( const_pointer s,
size_type position = npos ) const
inline

Find content within the string

Parameters
strThe content to find
posThe position to start searching from.

◆ rfind() [5/5]

template<typename T>
size_type etl::ibasic_string< T >::rfind ( T c,
size_type position = npos ) const
inline

Find character within the string

Parameters
cThe character to find
posThe position to start searching from.

◆ trim_to_terminator()

template<typename T>
void etl::ibasic_string< T >::trim_to_terminator ( )
inline

Trim the size to the distance to the first null terminator. If the last buffer position has a non-null value then the truncated flag will be set.

◆ uninitialized_resize()

template<typename T>
void etl::ibasic_string< T >::uninitialized_resize ( size_type new_size)
inline

Resizes the string, but doesn't initialise the free space except for a terminator null.

Parameters
new_sizeThe new size.

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