with std::regex one can get the "foo" part with the prefix() method of std::match_results.
Is there a correct way to have the same functionality with ctre? One cannot just compare the iterator of to_view().begin() with the original string's iterator as it is UB to compare iterators of different objects and comparing the pointers to the underlying data() is error-prone
Hello, given e.g.
with std::regex one can get the "foo" part with the prefix() method of std::match_results. Is there a correct way to have the same functionality with ctre? One cannot just compare the iterator of to_view().begin() with the original string's iterator as it is UB to compare iterators of different objects and comparing the pointers to the underlying data() is error-prone