Skip to content

Commit

Permalink
doc: minor tweak on startswith/endswith docs (#44288)
Browse files Browse the repository at this point in the history
This change makes it more clear whether `startswith(prefix)` is equivalent to:
- `s -> startswith(s, prefix)` or
- `s -> startswith(prefix, s)`
  • Loading branch information
aviatesk authored Feb 21, 2022
1 parent 1777553 commit 0a294f9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions base/strings/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@ used to implement specialized methods.
# Examples
```jldoctest
julia> endswith_julia = endswith("Julia");
julia> endswith_julia("Julia")
julia> endswith("Julia")("Ends with Julia")
true
julia> endswith_julia("JuliaLang")
julia> endswith("Julia")("JuliaLang")
false
```
"""
Expand All @@ -148,12 +146,10 @@ used to implement specialized methods.
# Examples
```jldoctest
julia> startswith_julia = startswith("Julia");
julia> startswith_julia("Julia")
julia> startswith("Julia")("JuliaLang")
true
julia> startswith_julia("NotJulia")
julia> startswith("Julia")("Ends with Julia")
false
```
"""
Expand Down

0 comments on commit 0a294f9

Please sign in to comment.