-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Why not use firstfirst
here?
AcceleratorLattice.jl/src/core.jl
Lines 40 to 47 in a43d413
function index(str::AbstractString, substr::AbstractString) | |
ns = length(substr) | |
for ix in range(1, length(str)-ns+1) | |
if str[ix:ix+ns-1] == substr; return ix; end | |
end | |
return 0 | |
end |
Metadata
Metadata
Assignees
Labels
No labels