31#ifndef ETL_WSTRING_INCLUDED
32#define ETL_WSTRING_INCLUDED
45 inline namespace literals
49 constexpr etl::wstring_view operator ""_sv(
const wchar_t* str,
size_t length)
noexcept
57 typedef ibasic_string<wchar_t> iwstring;
64 template <
size_t MAX_SIZE_>
72 typedef iwstring::value_type value_type;
123 ETL_EXPLICIT_STRING_FROM_CHAR
wstring(
const value_type* text)
137 this->
assign(text, text + count);
158 template <
typename TIterator>
162 this->
assign(first, last);
165#if ETL_HAS_INITIALIZER_LIST
195 if (position !=
size())
243#if ETL_HAS_ISTRING_REPAIR
244 virtual void repair() ETL_OVERRIDE
254 value_type buffer[MAX_SIZE + 1];
268 typedef iwstring::value_type value_type;
274 :
iwstring(buffer, buffer_size - 1U)
284 :
iwstring(buffer, buffer_size - 1U)
294 :
iwstring(buffer, buffer_size - 1U)
306 :
iwstring(buffer, buffer_size - 1U)
318 :
iwstring(buffer, buffer_size - 1U)
337 :
iwstring(buffer, buffer_size - 1U)
339 this->
assign(text, text + count);
348 :
iwstring(buffer, buffer_size - 1U)
360 template <
typename TIterator>
362 :
iwstring(buffer, buffer_size - 1U)
364 this->
assign(first, last);
367#if ETL_HAS_INITIALIZER_LIST
371 wstring_ext(std::initializer_list<value_type>
init, value_type* buffer, size_type buffer_size)
372 :
iwstring(buffer, buffer_size - 1U)
383 :
iwstring(buffer, buffer_size - 1U)
437#if ETL_HAS_ISTRING_REPAIR
438 virtual void repair() ETL_OVERRIDE
456#if ETL_USING_8BIT_TYPES
458 struct hash<
etl::iwstring>
462 return etl::private_hash::generic_hash<size_t>(
reinterpret_cast<const uint8_t*
>(text.
data()),
463 reinterpret_cast<const uint8_t*
>(text.
data() + text.
size()));
467 template <
size_t SIZE>
468 struct hash<
etl::wstring<SIZE> >
472 return etl::private_hash::generic_hash<size_t>(
reinterpret_cast<const uint8_t*
>(text.data()),
473 reinterpret_cast<const uint8_t*
>(text.data() + text.size()));
478 struct hash<
etl::wstring_ext>
482 return etl::private_hash::generic_hash<size_t>(
reinterpret_cast<const uint8_t*
>(text.
data()),
483 reinterpret_cast<const uint8_t*
>(text.
data() + text.
size()));
491 template<
size_t Array_Size>
500 template<
size_t MAX_SIZE,
size_t SIZE>
String view.
Definition string_view.h:100
ETL_CONSTEXPR const_iterator begin() const
Returns a const iterator to the beginning of the array.
Definition string_view.h:197
Definition basic_string.h:337
void resize(size_type new_size)
Definition basic_string.h:467
void assign(const etl::ibasic_string< T > &other)
Definition basic_string.h:663
pointer data()
Definition basic_string.h:626
void initialise()
Initialise the string.
Definition basic_string.h:2525
void repair_buffer(T *p_buffer_)
Fix the internal pointers after a low level memory copy.
Definition basic_string.h:2538
size_type length() const
Definition basic_string.h:196
size_type current_size
The current number of elements in the string.
Definition basic_string.h:322
size_type size() const
Definition basic_string.h:187
Definition basic_string.h:109
wstring_ext(const etl::iwstring &other, value_type *buffer, size_type buffer_size)
Definition wstring.h:293
wstring_ext(size_type count, value_type c, value_type *buffer, size_type buffer_size)
Definition wstring.h:347
wstring_ext(const value_type *text, value_type *buffer, size_type buffer_size)
Definition wstring.h:317
wstring_ext(value_type *buffer, size_type buffer_size)
Constructor.
Definition wstring.h:273
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)
Definition wstring.h:361
wstring_ext & operator=(const wstring_ext &rhs)
Assignment operator.
Definition wstring.h:391
wstring_ext(const etl::wstring_view &view, value_type *buffer, size_type buffer_size)
Definition wstring.h:382
wstring_ext(const etl::iwstring &other, value_type *buffer, size_type buffer_size, size_type position, size_type length=npos)
Definition wstring.h:305
void repair()
Fix the internal pointers after a low level memory copy.
Definition wstring.h:440
wstring_ext(const etl::wstring_ext &other, value_type *buffer, size_type buffer_size)
Definition wstring.h:283
wstring_ext(const value_type *text, size_type count, value_type *buffer, size_type buffer_size)
Definition wstring.h:336
wstring(const value_type *text, size_type count)
Definition wstring.h:134
wstring(const etl::iwstring &other)
Definition wstring.h:99
wstring(const etl::iwstring &other, size_type position, size_type length=npos)
Definition wstring.h:111
wstring(const etl::wstring_view &view)
Definition wstring.h:180
ETL_EXPLICIT_STRING_FROM_CHAR wstring(const value_type *text)
Definition wstring.h:123
wstring & operator=(const wstring &rhs)
Assignment operator.
Definition wstring.h:210
void repair()
Fix the internal pointers after a low level memory copy.
Definition wstring.h:246
wstring(TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
Definition wstring.h:159
wstring()
Constructor.
Definition wstring.h:79
wstring(size_type count, value_type c)
Definition wstring.h:145
wstring(const etl::wstring< MAX_SIZE_ > &other)
Definition wstring.h:89
etl::wstring< MAX_SIZE_ > substr(size_type position=0, size_type length_=npos) const
Definition wstring.h:191
#define ETL_ASSERT(b, e)
Definition error_handler.h:356
enable_if
Definition type_traits_generator.h:1186
is_integral
Definition type_traits_generator.h:996
bitset_ext
Definition absolute.h:38
etl::string< Array_Size - 1U > make_string(const char(&text)[Array_Size])
Hash function.
Definition string.h:513
etl::string< MAX_SIZE > make_string_with_capacity(const char(&text)[SIZE])
Make string with max capacity from string literal or array.
Definition string.h:522
ETL_CONSTEXPR14 size_t strlen(const T *t)
Alternative strlen for all character types.
Definition char_traits.h:285
Character traits for any character type.
Definition char_traits.h:120
pair holds two objects of arbitrary type
Definition utility.h:164
ETL_CONSTEXPR pair()
Default constructor.
Definition utility.h:176