A little relevant to this topic but I’d like to know is there a particular reason for findfirst
to not return all the indices a char
occupies when it has multiple code units?
julia> findfirst("α", "α1")
1:1
The reason I ask this is that I want to efficiently locate a char inside a string no matter how many code units it contains. I know I can definitely do something like this though:
findfirst("α", "α1")[1] : ncodeunits("α")
1:2
Thank you!