FOSSredder 0.5.0
Loading...
Searching...
No Matches
FilterSpec.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <algorithm>
9#include <cctype>
10#include <cstddef>
11#include <string>
12#include <utility>
13
14namespace core::domain {
15
17public:
18 const std::string& value() const noexcept;
19
20 FilterSpec() = default;
25 explicit FilterSpec(std::string value);
26
31 static constexpr std::size_t maxLength() noexcept;
32
38 static std::string normalize(std::string value);
39
45 static bool isValid(const std::string& value);
46
51 bool empty() const noexcept;
52
53private:
54 std::string value_;
55};
56
57} // namespace core::domain
const std::string & value() const noexcept
bool empty() const noexcept
Checks whether the stored value is empty.
static std::string normalize(std::string value)
Trims leading and trailing whitespace from a filter specification.
static bool isValid(const std::string &value)
Checks whether a raw filter specification is valid.
static constexpr std::size_t maxLength() noexcept
Returns the maximum supported filter specification length.