Skip to content

Commit

Permalink
improve findnext/findprev docstring for strings (#29415)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet authored and StefanKarpinski committed Sep 28, 2018
1 parent ba41f69 commit bc34c64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/strings/search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ must be of type `String`.
The return value is a range of indices where the matching sequence is found, such that
`s[findnext(x, s, i)] == x`:
`findnext("substring", string, i)` = `start:end` such that
`string[start:end] == "substring"`, or `nothing` if unmatched.
`findnext("substring", string, i)` == `start:stop` such that
`string[start:stop] == "substring"` and `i <= start`, or `nothing` if unmatched.
# Examples
```jldoctest
Expand Down Expand Up @@ -411,8 +411,8 @@ Find the previous occurrence of `pattern` in `string` starting at position `star
The return value is a range of indices where the matching sequence is found, such that
`s[findprev(x, s, i)] == x`:
`findprev("substring", string, i)` = `start:end` such that
`string[start:end] == "substring"`, or `nothing` if unmatched.
`findprev("substring", string, i)` == `start:stop` such that
`string[start:stop] == "substring"` and `stop <= i`, or `nothing` if unmatched.
# Examples
```jldoctest
Expand Down

0 comments on commit bc34c64

Please sign in to comment.