| 249 | } |
| 250 | |
| 251 | std::optional<uint32_t> StringBox::toUInt32() const noexcept { |
| 252 | auto sv = toStringView(); |
| 253 | uint32_t value = 0; |
| 254 | |
| 255 | auto [ptr, ec] = std::from_chars(sv.data(), sv.data() + sv.size(), value); |
| 256 | if (ec == std::errc() && ptr == sv.data() + sv.size()) { |
| 257 | return value; |
| 258 | } |
| 259 | return std::nullopt; |
| 260 | } |
| 261 | |
| 262 | StringBox StringBox::append(const std::string_view& other) const noexcept { |
| 263 | std::string out; |