Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::wstring_ext Class Reference

#include <wstring.h>

Public Types

typedef iwstring base_type
 
typedef iwstring interface_type
 
typedef iwstring::value_type value_type
 
- Public Types inherited from etl::ibasic_string< T >
typedef ibasic_string< Tinterface_type
 
typedef T value_type
 
typedef Treference
 
typedef const Tconst_reference
 
typedef Tpointer
 
typedef const Tconst_pointer
 
typedef Titerator
 
typedef const Tconst_iterator
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iteratorconst_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

 wstring_ext (value_type *buffer, size_type buffer_size)
 Constructor.
 
 wstring_ext (const etl::wstring_ext &other, value_type *buffer, size_type buffer_size)
 
 wstring_ext (const etl::iwstring &other, value_type *buffer, size_type buffer_size)
 
 wstring_ext (const etl::iwstring &other, value_type *buffer, size_type buffer_size, size_type position, size_type length=npos)
 
 wstring_ext (const value_type *text, value_type *buffer, size_type buffer_size)
 
 wstring_ext (const value_type *text, size_type count, value_type *buffer, size_type buffer_size)
 
 wstring_ext (size_type count, value_type c, value_type *buffer, size_type buffer_size)
 
template<typename TIterator >
 wstring_ext (TIterator first, TIterator last, value_type *buffer, size_type buffer_size, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
 
 wstring_ext (const etl::wstring_view &view, value_type *buffer, size_type buffer_size)
 
wstring_extoperator= (const wstring_ext &rhs)
 Assignment operator.
 
wstring_extoperator= (const iwstring &rhs)
 Assignment operator.
 
wstring_extoperator= (const value_type *text)
 Assignment operator.
 
void repair ()
 Fix the internal pointers after a low level memory copy.
 
- Public Member Functions inherited from etl::ibasic_string< T >
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)
 
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)
 
void assign (const_pointer other)
 
void assign (const_pointer other, size_type length_)
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void assign (size_type n, T value)
 
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)
 
ibasic_stringappend (const T *str)
 
ibasic_stringappend (const T *str, size_type n)
 
ibasic_stringappend (size_type n, T c)
 
template<class TIterator >
ibasic_stringappend (TIterator first, TIterator last)
 
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)
 
etl::ibasic_string< T > & insert (size_type position, const etl::ibasic_string< T > &str)
 
etl::ibasic_string< T > & insert (size_type position, const etl::ibasic_string< T > &str, 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
 
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
 
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
 
ibasic_stringreplace (size_type position, size_type length_, const ibasic_string &str)
 
ibasic_stringreplace (const_iterator first, const_iterator last, const ibasic_string &str)
 
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'.
 
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)
 Replace characters from 'first' 'last' with pointed to 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 (const_iterator first, const_iterator last, const_pointer s, size_type n)
 Replace characters from 'first' to 'last' 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.
 
int compare (size_type position, size_type length_, const ibasic_string &str) const
 Compare position / length with string.
 
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.
 
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
 
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
 
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
 
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
 
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.
 
ibasic_stringoperator+= (const ibasic_string &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
 
ETL_DEPRECATED bool truncated () const
 
bool is_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.
 

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 Member Functions inherited from etl::ibasic_string< T >
 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.
 
- 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.
 
- 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_tflags
 

Detailed Description

A wstring implementation that uses a fixed size external buffer.

Constructor & Destructor Documentation

◆ wstring_ext() [1/8]

etl::wstring_ext::wstring_ext ( const etl::wstring_ext other,
value_type *  buffer,
size_type  buffer_size 
)
inline

Copy constructor.

Parameters
otherThe other wstring_ext.

◆ wstring_ext() [2/8]

etl::wstring_ext::wstring_ext ( const etl::iwstring other,
value_type *  buffer,
size_type  buffer_size 
)
inline

From other iwstring.

Parameters
otherThe other iwstring.

◆ wstring_ext() [3/8]

etl::wstring_ext::wstring_ext ( const etl::iwstring other,
value_type *  buffer,
size_type  buffer_size,
size_type  position,
size_type  length = npos 
)
inline

From other wstring_ext, position, length.

Parameters
otherThe other wstring_ext.
positionThe position of the first character.
lengthThe number of characters. Default = npos.

◆ wstring_ext() [4/8]

etl::wstring_ext::wstring_ext ( const value_type *  text,
value_type *  buffer,
size_type  buffer_size 
)
inline

Constructor, from null terminated text.

Parameters
textThe initial text of the wstring_ext.

◆ wstring_ext() [5/8]

etl::wstring_ext::wstring_ext ( const value_type *  text,
size_type  count,
value_type *  buffer,
size_type  buffer_size 
)
inline

Constructor, from null terminated text and count.

Parameters
textThe initial text of the wstring_ext.
countThe number of characters to copy.

◆ wstring_ext() [6/8]

etl::wstring_ext::wstring_ext ( size_type  count,
value_type  c,
value_type *  buffer,
size_type  buffer_size 
)
inline

Constructor, from initial size and value.

Parameters
initialSizeThe initial size of the wstring_ext.
valueThe value to fill the wstring_ext with.

◆ wstring_ext() [7/8]

template<typename TIterator >
etl::wstring_ext::wstring_ext ( TIterator  first,
TIterator  last,
value_type *  buffer,
size_type  buffer_size,
typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type  = 0 
)
inline

Constructor, from an iterator range.

Template Parameters
TIteratorThe iterator type.
Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ wstring_ext() [8/8]

etl::wstring_ext::wstring_ext ( const etl::wstring_view view,
value_type *  buffer,
size_type  buffer_size 
)
inlineexplicit

From wstring_view.

Parameters
viewThe wstring_view.

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