15 consteval FixedString(std::string_view s)
noexcept { std::copy_n(s.data(), s.size(), buf); }
16 consteval FixedString(
char const* s)
noexcept { std::copy_n(s, N, buf); }
18 constexpr operator std::string_view()
const noexcept {
return buf; }
20 constexpr char const* c_str()
const noexcept {
return buf; }
21 constexpr std::string_view sv()
const noexcept {
return buf; }
22 constexpr std::string str()
const noexcept {
return buf; }
24 [[nodiscard]]
constexpr char const& operator[](
size_t idx)
const noexcept {
return buf[idx]; }
25 [[nodiscard]]
constexpr char& operator[](
size_t idx)
noexcept {
return buf[idx]; }
30 std::copy_n(buf, N, res.buf);
31 std::copy_n(other.buf, Ny, N + res.buf);