Hello, I'm not sure if this is what you need, but you could use: str = "abc" temp = collect(graphemes(str)) find(temp .== "c")
On Thursday, October 20, 2016 at 2:34:03 PM UTC-3, program...@gmail.com wrote: > > What wrong ? > julia> o=open("string.txt","w") > IOStream(<file string.txt>) > > julia> write(o,b) > 12 > > julia> close(o) > > julia> o=open("string.txt") > IOStream(<file string.txt>) > > julia> temp=readline() > > "\r\n" > > julia> temp=readline(o) > "sa sdś aa,1" > > julia> > > julia> temp[6] > 'ś' > > julia> temp[7] > ERROR: UnicodeError: invalid character index > in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at > .\strings\string.jl:67 > in next at .\strings\string.jl:92 [inlined] > in getindex(::String, ::Int64) at .\strings\basic.jl:70 > > julia> temp > "sa sdś aa,1" > > julia> eltype(temp) > Char > > julia> typeof(temp) > String > > julia> temp[3] > ' ' > > Paul > >