File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,24 @@ namespace mlib
296
296
return container<(str.template nth_element <indexes>())...>{};
297
297
}(std::make_index_sequence<str.size ()>{});
298
298
}
299
+
300
+ template <char c>
301
+ constexpr auto all_characters_are () const noexcept
302
+ {
303
+ return [&]<std::size_t ... indexes>(std::index_sequence<indexes...>)
304
+ {
305
+ return ((c == str.template nth_element <indexes>()) && ...);
306
+ }(std::make_index_sequence<str.size ()>{});
307
+ }
308
+
309
+ template <char c>
310
+ constexpr auto all_characters_are_not () const noexcept
311
+ {
312
+ return [&]<std::size_t ... indexes>(std::index_sequence<indexes...>)
313
+ {
314
+ return ((c != str.template nth_element <indexes>()) && ...);
315
+ }(std::make_index_sequence<str.size ()>{});
316
+ }
299
317
300
318
constexpr auto data () const noexcept { return str.data ; }
301
319
constexpr auto string_view () const noexcept { return std::string_view{ str.data }; }
You can’t perform that action at this time.
0 commit comments