Dear all,
julia> s = "abcdefg"
"abcdefg"
julia> s[end-4, end]
ERROR: MethodError: no method matching axes(::String, ::Int64)
Closest candidates are:
axes(::AbstractDataFrame, ::Integer) at ~/.julia/packages/DataFrames/zqFGs/src/abstractdataframe/abstractdataframe.jl:366
axes(::Number, ::Integer) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/number.jl:83
axes(::Base.Broadcast.Broadcasted{<:Any, <:Tuple{Vararg{T, N}} where T}, ::Integer) where N at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/broadcast.jl:227
...
Stacktrace:
[1] lastindex(a::String, d::Int64)
@ Base ./abstractarray.jl:373
[2] top-level scope
@ REPL[91]:1
Why can not use s[end-4, end]
?