#undef NDEBUG
#include <stdio.h>
#include <stdlib.h>
auto main() -> int
{
static_assert(str.capacity() == 32);
str.append("Hello", 2);
str.append(2, 'l');
str.push_back('o');
str.append(other, 0);
auto const copy = str;
auto toUpper = [](
auto ch) {
return static_cast<char>(
etl::toupper(ch)); };
str.insert(0, 2, ' ');
assert(str ==
" HELLO WORLD");
str.insert(7, " foo");
assert(str ==
" HELLO foo WORLD");
assert(str.ends_with(
"WORLD"));
return 0;
}
#define assert(...)
Definition cassert.hpp:19
constexpr auto transform(InputIt first, InputIt last, OutputIt dest, UnaryOp op) -> OutputIt
Applies the given function to a range and stores the result in another range, beginning at dest....
Definition transform.hpp:24
constexpr auto toupper(int ch) noexcept -> int
Converts the given character to uppercase according to the character conversion rules defined by the ...
Definition toupper.hpp:26
basic_string_view< char, etl::char_traits< char > > string_view
Typedef for common character type char
Definition basic_string_view.hpp:704
constexpr auto to_string(int value) noexcept -> etl::inplace_string< Capacity >
Converts a numeric value to etl::inplace_string.
Definition to_string.hpp:28
basic_inplace_string< char, Capacity > inplace_string
Typedef for a basic_inplace_string using 'char'.
Definition basic_inplace_string.hpp:1330
constexpr auto size() const noexcept -> size_type
Returns the number of Char elements in the view, i.e. etl::distance(begin(), end()).
Definition basic_string_view.hpp:174