lastindex(str)
: In Strings · The Julia Language, we see
-
lastindex(str)
gives the maximal (byte) index that can be used to index intostr
.
In REPL help mode: ?lastindex
, nothing on strings, only text as seen in Collections and Data Structures · The Julia Language
I hope that there is something like:
lastindex(str::AbstractString)
gives the maximal (byte) index that can be used to index into str.
Examples
julia> lastindex("") 0 julia> lastindex("∀") 1