any_of.h 312 B

123456789101112131415161718
  1. //
  2. // any_of.h
  3. // string-utils
  4. //
  5. // Created by Sam Jaffe on 2/13/21.
  6. // Copyright © 2021 Sam Jaffe. All rights reserved.
  7. //
  8. #pragma once
  9. #include <string>
  10. namespace string_utils {
  11. template <typename... Ts> bool any_of(std::string_view value, Ts const&... rest) {
  12. return ((value == rest) || ...);
  13. }
  14. }