bughelp wantedsearch & findstrings
Repository metrics
- Stars
- (48,709 stars)
- PR merge metrics
- (平均マージ 20d 6h) (30d で 157 merged PRs)
説明
I think the behavior of findprev and findlast with an empty search string is wrong:
For non-empty search strings, findnext(needle, haystack, i) returns a range whose start is at least i. Similarly, findprev(needle, haystack, i) returns a range whose stop is at most i. Consider the following example:
julia> findnext("aa", "aaaa", 2)
2:3
julia> findprev("aa", "aaaa", 2)
1:2
However, this is not the case for an empty needle:
julia> findnext("", "aaaa", 2)
2:1
julia> findprev("", "aaaa", 2)
2:1
I think the findprev behavior is wrong, we should have findprev("", "abc", 2) === 3:2.
The same holds for findlast: I think we should have findlast("", "aaaa") === 5:4 instead of 4:3.