Skip to content

Commit

Permalink
add resize_and_overwrite test
Browse files Browse the repository at this point in the history
  • Loading branch information
trcrsired committed Sep 30, 2024
1 parent 520b79d commit 2fcf1b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/0026.container/0004.string/string.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <fast_io_dsal/string.h>
#include <fast_io.h>
#include <algorithm>

int main()
{
Expand Down Expand Up @@ -42,6 +43,10 @@ int main()
::std::ranges::swap(str19,str18);
auto str20(str16);
str20.erase_index(1,3);
str20.resize_and_overwrite(40,[](char8_t* buf, ::std::size_t n) noexcept
{
return static_cast<::std::size_t>(::std::fill_n(buf, 20u, u8'z') - buf);
});
::fast_io::io::println(
::fast_io::u8c_stdout(),
u8"u8vw=", u8vw,
Expand Down

0 comments on commit 2fcf1b5

Please sign in to comment.