input.h 293 B

123456789101112131415161718
  1. #ifndef INPUT_H
  2. #define INPUT_H
  3. #include <string>
  4. #include <optional>
  5. std::string ReadFile(const std::string &filepath);
  6. class Lines {
  7. private:
  8. std::string_view text_;
  9. public:
  10. explicit Lines(std::string_view text) : text_(text) {}
  11. std::optional<std::string_view> Next();
  12. };
  13. #endif