summaryrefslogtreecommitdiffstats
path: root/server/src/locale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/locale.cpp')
-rw-r--r--server/src/locale.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/locale.cpp b/server/src/locale.cpp
index a964d5e..38291f9 100644
--- a/server/src/locale.cpp
+++ b/server/src/locale.cpp
@@ -119,19 +119,19 @@ auto selector::make_matcher(std::vector<std::locale> const& supported_locales)
119} 119}
120 120
121// Trimming optional whitespace as defined in RFC 9110, § 12.4.2. 121// Trimming optional whitespace as defined in RFC 9110, § 12.4.2.
122auto selector::ltrim_ows(std::string_view s) -> std::string_view 122auto ltrim_ows(std::string_view s) -> std::string_view
123{ 123{
124 if (auto i = s.find_first_not_of(" \t"); i != std::string_view::npos) 124 if (auto i = s.find_first_not_of(" \t"); i != std::string_view::npos)
125 s.remove_prefix(i); 125 s.remove_prefix(i);
126 return s; 126 return s;
127} 127}
128auto selector::rtrim_ows(std::string_view s) -> std::string_view 128auto rtrim_ows(std::string_view s) -> std::string_view
129{ 129{
130 if (auto i = s.find_last_not_of(" \t"); i != std::string_view::npos) 130 if (auto i = s.find_last_not_of(" \t"); i != std::string_view::npos)
131 return s.substr(0, i + 1); 131 return s.substr(0, i + 1);
132 return s; 132 return s;
133} 133}
134auto selector::trim_ows(std::string_view s) -> std::string_view 134auto trim_ows(std::string_view s) -> std::string_view
135{ 135{
136 return rtrim_ows(ltrim_ows(s)); 136 return rtrim_ows(ltrim_ows(s));
137} 137}