Julia why the output is 4:4 of the function findnext

I am new to Julia why the function is returning value 4:4 what does it means ??

findnext("o", "xylophone", 1)

It means that the first occurrence of query string "o" after index 1 in "xylophone" occurs at indexes 4:4 - that is, the indices from 4 up to and including 4:

julia> "xylophone"[4:4]
"o"
5 Likes

also note

julia> findnext('o', "xylophone", 1)
4

This is not a bug β€” it’s an intentional difference between strings and characters

6 Likes