1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

libutil: Add Pos::getSnippetUpTo(Pos)

This commit is contained in:
Robert Hensing 2024-07-09 11:43:07 +02:00
parent 63f520fd00
commit e5af7cbeb9
3 changed files with 168 additions and 0 deletions

View file

@ -63,6 +63,8 @@ struct Pos
bool operator==(const Pos & rhs) const = default;
auto operator<=>(const Pos & rhs) const = default;
std::string getSnippetUpTo(const Pos & end) const;
struct LinesIterator {
using difference_type = size_t;
using value_type = std::string_view;