Skip to content

Commit db3bcf5

Browse files
author
Hana Dusíková
committed
fixed readme
1 parent 20294f0 commit db3bcf5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ More documentation on [pcre.org](https://www.pcre.org/current/doc/html/pcre2synt
4343
This is approximated API specification from a user perspective (omitting `constexpr` and `noexcept` which are everywhere, and using C++20 syntax even the API is C++17 compatible):
4444
```c++
4545
// look if whole input matches the regex:
46-
template <fixed_string regex> auto ctre::match(auto Range &&) -> regex_result;
47-
template <fixed_string regex> auto ctre::match(auto First &&, auto Last &&) -> regex_result;
46+
template <fixed_string regex> auto ctre::match(auto Range &&) -> regex_results;
47+
template <fixed_string regex> auto ctre::match(auto First &&, auto Last &&) -> regex_results;
4848

4949
// look if input contains match somewhere inside of itself:
50-
template <fixed_string regex> auto ctre::search(auto Range &&) -> regex_result;
51-
template <fixed_string regex> auto ctre::search(auto First &&, auto Last &&) -> regex_result;
50+
template <fixed_string regex> auto ctre::search(auto Range &&) -> regex_results;
51+
template <fixed_string regex> auto ctre::search(auto First &&, auto Last &&) -> regex_results;
5252

5353
// check if input starts with match (but doesn't need to match everything):
54-
template <fixed_string regex> auto ctre::starts_with(auto Range &&) -> regex_result;
55-
template <fixed_string regex> auto ctre::starts_with(auto First &&, auto Last &&) -> regex_result;
54+
template <fixed_string regex> auto ctre::starts_with(auto Range &&) -> regex_results;
55+
template <fixed_string regex> auto ctre::starts_with(auto First &&, auto Last &&) -> regex_results;
5656

5757
// result type is deconstructible into a structured bindings
58-
template <...> struct regex_result {
58+
template <...> struct regex_results {
5959
operator bool() const; // if it's a match
6060
auto to_view() const -> std::string_view; // also view()
6161
auto to_string() const -> std::string; // also str()
@@ -65,7 +65,7 @@ template <...> struct regex_result {
6565
// also size(), begin(), end(), data()
6666

6767
size_t count() const; // number of captures
68-
template <size_t Id> const regex_result & get() const; // provide specific capture, whole regex_result is implicit capture 0
68+
template <size_t Id> const captured_content & get() const; // provide specific capture, whole regex_results is implicit capture 0
6969
};
7070
```
7171

0 commit comments

Comments
 (0)