Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findnext should use iteration #16538

Closed
Keno opened this issue May 23, 2016 · 1 comment
Closed

findnext should use iteration #16538

Keno opened this issue May 23, 2016 · 1 comment

Comments

@Keno
Copy link
Member

Keno commented May 23, 2016

Currently, it tries to access invalid elements:

julia> findfirst(x->x=='0', "⨳⨳")
ERROR: UnicodeError: invalid character index
 in next(::String, ::Int64) at ./unicode/utf8.jl:65
 in getindex at ./strings/basic.jl:58 [inlined]
 in findnext(::##25#26, ::String, ::Int64) at ./array.jl:748
 in findfirst(::Function, ::String) at ./array.jl:754
 in eval(::Module, ::Any) at ./boot.jl:225
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46
@vtjnash
Copy link
Sponsor Member

vtjnash commented May 23, 2016

#15755

@vtjnash vtjnash closed this as completed May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants