16constexpr std::size_t kMaxLength = 64;
30 const auto begin = std::find_if_not(
value.begin(),
value.end(), [](
unsigned char c) {
31 return std::isspace(c) != 0;
33 const auto end = std::find_if_not(
value.rbegin(),
value.rend(), [](
unsigned char c) {
34 return std::isspace(c) != 0;
39 return std::string(begin, end);
44 return !normalized.empty() && normalized.size() <=
maxLength();
48 return value_.empty();
static bool isValid(const std::string &value)
Checks whether a raw export format is valid.
static std::string normalize(std::string value)
Trims leading and trailing whitespace from an export format.
static constexpr std::size_t maxLength() noexcept
Returns the maximum supported export format length.
bool empty() const noexcept
Checks whether the stored value is empty.
const std::string & value() const noexcept