Skip to content

Commit

Permalink
Update eachsplit example, fixes #46751 (#47070)
Browse files Browse the repository at this point in the history
  • Loading branch information
MonliH authored Oct 7, 2022
1 parent f1b05c1 commit d498d36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/strings/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,10 @@ See also [`split`](@ref).
julia> a = "Ma.rch"
"Ma.rch"
julia> collect(eachsplit(a, "."))
julia> b = eachsplit(a, ".")
Base.SplitIterator{String, String}("Ma.rch", ".", 0, true)
julia> collect(b)
2-element Vector{SubString{String}}:
"Ma"
"rch"
Expand Down

0 comments on commit d498d36

Please sign in to comment.