On Sunday, September 27, 2015 at 6:31:33 AM UTC-4, Tim Holy wrote:
>
> I think the only advantage of ASCIIString is that str[8:12] is performant, 
> because you know the byte offset directly from the index. That's not true 
> for 
> UTF8String. 


The indices passed to strings in Julia are byte offsets, not character 
offsets.  So str[8:12] has the same complexity for UTF8String as for 
ASCIIString.  (The downside of this is that it is possible to pass invalid 
byte indices to a UTF8String, which throws an exception. 
 See https://github.com/JuliaLang/julia/issues/9297 for a proposal to avoid 
this.)

Reply via email to