Seems like if s[a:b] is intended to index into s.data, then the indexing should be consistent with arrays and s[end] should give the last byte, though since s[1] and s[5] return characters, not a single byte, there's a little bit of conflict. Ok I've found a lengthy discussion of this and related issues, and looks like this behaviour is very likely going to change: https://github.com/JuliaLang/julia/issues/9297
In related news, this looks like an actual bug: s = "🛀🛀" s12 = s[1:2] # "🛀" s56 = s[5:6] # "?" sizeof(s12) # 4 sizeof(s56) # 2 The issue seems to be that nextind(s, 2) #5 nextind(s, 6) #7 (prob should be 9) I think the fix is to change https://github.com/JuliaLang/julia/blob/master/base/strings/basic.jl#L141 to return sizeof(s)+1 Will file an issue. Good talk. :) Happy thanksgiving to those in the USA
