When I use the code
findall("DD","DDDAADDD")
I get the response
2-element Vector{UnitRange{Int64}}:
1:2
6:7
But perhaps the answer might include the others, such as 2:3
and 7:8
? What am I missing here? The function seems to miss overlaps.
When I use the code
findall("DD","DDDAADDD")
I get the response
2-element Vector{UnitRange{Int64}}:
1:2
6:7
But perhaps the answer might include the others, such as 2:3
and 7:8
? What am I missing here? The function seems to miss overlaps.
you have to explicitly request it
julia> findall("DD","DDDAADDD", overlap=true)
4-element Vector{UnitRange{Int64}}:
1:2
2:3
6:7
7:8
OK thanks. I thought I read the REPL help for the function and there was no mention of that option that I could see.
That’s odd, overlap
is definitely in the docstring for findall(::String, ...)
.
But for some reason that isn’t one of the methods for which the docstring is printed in the REPL help?