31#ifndef ETL_WSTRING_INCLUDED
32#define ETL_WSTRING_INCLUDED
45 inline namespace literals
49 inline constexpr etl::wstring_view operator ""_sv(
const wchar_t* str,
size_t length)
noexcept
64 template <
size_t MAX_SIZE_>
72 typedef iwstring::value_type value_type;
126 ETL_EXPLICIT_STRING_FROM_CHAR
wstring(
const value_type* text)
138 wstring(
const value_type* text, size_type count)
142 this->
assign(text, text + count);
163 template <
typename TIterator>
168 this->
assign(first, last);
171#if ETL_HAS_INITIALIZER_LIST
203 if (position !=
size())
251#if ETL_HAS_ISTRING_REPAIR
252 virtual void repair() ETL_OVERRIDE
262 value_type buffer[MAX_SIZE + 1];
276 typedef iwstring::value_type value_type;
282 :
iwstring(buffer, buffer_size - 1U)
292 :
iwstring(buffer, buffer_size - 1U)
303 :
iwstring(buffer, buffer_size - 1U)
316 :
iwstring(buffer, buffer_size - 1U)
328 wstring_ext(
const value_type* text, value_type* buffer, size_type buffer_size)
329 :
iwstring(buffer, buffer_size - 1U)
348 wstring_ext(
const value_type* text, size_type count, value_type* buffer, size_type buffer_size)
349 :
iwstring(buffer, buffer_size - 1U)
352 this->
assign(text, text + count);
360 wstring_ext(size_type count, value_type
c, value_type* buffer, size_type buffer_size)
361 :
iwstring(buffer, buffer_size - 1U)
373 template <
typename TIterator>
375 :
iwstring(buffer, buffer_size - 1U)
378 this->
assign(first, last);
381#if ETL_HAS_INITIALIZER_LIST
385 wstring_ext(std::initializer_list<value_type>
init, value_type* buffer, size_type buffer_size)
386 :
iwstring(buffer, buffer_size - 1U)
398 :
iwstring(buffer, buffer_size - 1U)
453#if ETL_HAS_ISTRING_REPAIR
454 virtual void repair() ETL_OVERRIDE
472#if ETL_USING_8BIT_TYPES
474 struct hash<
etl::iwstring>
478 return etl::private_hash::generic_hash<size_t>(
reinterpret_cast<const uint8_t*
>(text.
data()),
479 reinterpret_cast<const uint8_t*
>(text.
data() + text.
size()));
483 template <
size_t SIZE>
484 struct hash<
etl::wstring<SIZE> >
488 return etl::private_hash::generic_hash<size_t>(
reinterpret_cast<const uint8_t*
>(text.
data()),
489 reinterpret_cast<const uint8_t*
>(text.
data() + text.
size()));
494 struct hash<
etl::wstring_ext>
498 return etl::private_hash::generic_hash<size_t>(
reinterpret_cast<const uint8_t*
>(text.
data()),
499 reinterpret_cast<const uint8_t*
>(text.
data() + text.
size()));
507 template<
size_t Array_Size>
516 template<
size_t MAX_SIZE,
size_t SIZE>
String view.
Definition string_view.h:104
ETL_CONSTEXPR const_iterator begin() const
Returns a const iterator to the beginning of the array.
Definition string_view.h:204
Definition basic_string.h:351
void resize(size_type new_size)
Definition basic_string.h:481
void assign(const etl::ibasic_string< T > &other)
Definition basic_string.h:677
pointer data()
Definition basic_string.h:640
void initialise()
Initialise the string.
Definition basic_string.h:2548
void repair_buffer(T *p_buffer_)
Fix the internal pointers after a low level memory copy.
Definition basic_string.h:2560
size_type length() const
Definition basic_string.h:202
size_type current_size
The current number of elements in the string.
Definition basic_string.h:336
size_type size() const
Definition basic_string.h:193
Definition basic_string.h:115
wstring_ext(const etl::iwstring &other, value_type *buffer, size_type buffer_size)
Definition wstring.h:302
wstring_ext(size_type count, value_type c, value_type *buffer, size_type buffer_size)
Definition wstring.h:360
wstring_ext(const value_type *text, value_type *buffer, size_type buffer_size)
Definition wstring.h:328
wstring_ext(value_type *buffer, size_type buffer_size)
Constructor.
Definition wstring.h:281
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:374
wstring_ext & operator=(const wstring_ext &rhs)
Assignment operator.
Definition wstring.h:407
wstring_ext(const etl::wstring_view &view, value_type *buffer, size_type buffer_size)
Definition wstring.h:397
wstring_ext(const etl::iwstring &other, value_type *buffer, size_type buffer_size, size_type position, size_type length=npos)
Definition wstring.h:315
void repair()
Fix the internal pointers after a low level memory copy.
Definition wstring.h:456
wstring_ext(const etl::wstring_ext &other, value_type *buffer, size_type buffer_size)
Definition wstring.h:291
wstring_ext(const value_type *text, size_type count, value_type *buffer, size_type buffer_size)
Definition wstring.h:348
wstring(const value_type *text, size_type count)
Definition wstring.h:138
wstring(const etl::iwstring &other)
Definition wstring.h:100
wstring(const etl::iwstring &other, size_type position, size_type length=npos)
Definition wstring.h:113
wstring(const etl::wstring_view &view)
Definition wstring.h:187
ETL_EXPLICIT_STRING_FROM_CHAR wstring(const value_type *text)
Definition wstring.h:126
wstring & operator=(const wstring &rhs)
Assignment operator.
Definition wstring.h:218
void repair()
Fix the internal pointers after a low level memory copy.
Definition wstring.h:254
wstring(TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
Definition wstring.h:164
wstring()
Constructor.
Definition wstring.h:79
wstring(size_type count, value_type c)
Definition wstring.h:150
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:199
#define ETL_ASSERT(b, e)
Definition error_handler.h:356
enable_if
Definition type_traits_generator.h:1230
is_integral
Definition type_traits_generator.h:1040
bitset_ext
Definition absolute.h:38
etl::string< Array_Size - 1U > make_string(const char(&text)[Array_Size])
Hash function.
Definition string.h:526
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:535
ETL_CONSTEXPR14 size_t strlen(const T *t)
Alternative strlen for all character types.
Definition char_traits.h:287
ETL_NODISCARD ETL_CONSTEXPR14 T round_half_even_unscaled(T value) ETL_NOEXCEPT
Definition scaled_rounding.h:314