Skip to content

Commit 542ddc7

Browse files
change reward for ch 20 21
1 parent cb2e15c commit 542ddc7

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

doc/src/challenges/0020-str-pattern-pt1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- **Tracking Issue:** [#277](https://github.com/model-checking/verify-rust-std/issues/277)
55
- **Start date:** *2025-03-07*
66
- **End date:** *2025-10-17*
7-
- **Reward:** *5000 USD*
7+
- **Reward:** *10000 USD*
88

99
-------------------
1010

doc/src/challenges/0021-str-pattern-pt2.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,38 @@
44
- **Tracking Issue:** [#278](https://github.com/model-checking/verify-rust-std/issues/278)
55
- **Start date:** *2025-03-07*
66
- **End date:** *2025-10-17*
7-
- **Reward:** *5000 USD*
7+
- **Reward:** *10000 USD*
88

99
-------------------
1010

1111

1212
### Context
1313

1414
The following str library functions are generic over the `Pattern` trait (https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html):
15-
contains, starts_with, ends_with, find, rfind, split, split_inclusive, rsplit, split_terminator, rsplit_terminator, splitn, rsplitn, split_once, rsplit_once, rmatches, match_indices, rmatch_indices, trim_matches, trim_start_matches,
16-
strip_prefix, strip_suffix, trim_end_matches.
17-
The functions which take Pattern as input turn the input str into a kind of `Searcher` (https://doc.rust-lang.org/std/str/pattern/trait.Searcher.html) which iterates over positions where the Pattern matches, then perform their desired operations (split, find, ...).
18-
Those functions is implemented in (library/core/src/str/mod.rs), but the core of them is the searching algorithms which are implemented in (library/core/src/str/pattern.rs).
15+
- `contains`
16+
- `starts_with`
17+
- `ends_with`
18+
- `find`
19+
- `rfind`
20+
- `split`
21+
- `split_inclusive`
22+
- `rsplit`
23+
- `split_terminator`
24+
- `rsplit_terminator`
25+
- `splitn`
26+
- `rsplitn`
27+
- `split_once`
28+
- `rsplit_once`
29+
- `rmatches`
30+
- `match_indices`
31+
- `rmatch_indices`
32+
- `trim_matches`
33+
- `trim_start_matches`
34+
- `strip_prefix`
35+
- `strip_suffix`
36+
- `trim_end_matches`
37+
These functions accept a pattern as input, then call [into_searcher](https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html#tymethod.into_searcher) to create a [Searcher](https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html#associatedtype.Searcher) for the pattern. They use this `Searcher` to perform their desired operations (split, find, etc.).
38+
Those functions are implemented in (library/core/src/str/mod.rs), but the core of them is the searching algorithms which are implemented in (library/core/src/str/pattern.rs).
1939

2040
# Details
2141

0 commit comments

Comments
 (0)