31inline bool parseHoldMs(
const std::string& text, uint32_t& out) {
32 const size_t b = text.find_first_not_of(
" \t\r\n");
33 if (
b == std::string::npos)
35 const size_t e = text.find_last_not_of(
" \t\r\n");
37 const char* first = text.data() +
b;
38 const char* last = text.data() + e + 1;
41 const auto res = std::from_chars(first, last, v);
42 if (
res.ec != std::errc() ||
res.ptr != last)
47 out =
static_cast<uint32_t
>(v);