You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nextind has a bunch of methods, only the AbstractString one is documented. I think a generic nextind(x, i::Integer) would be good. If that's not accepted, at least the existing methods should be documented.
julia>methods(nextind)
# 13 methods for generic function "nextind" from Base:
[1] nextind(source::JuliaSyntax.SourceFile, i::Integer)
@ JuliaSyntax ~/.julia/packages/JuliaSyntax/eqCSU/src/source_files.jl:127
[2] nextind(source::Base.JuliaSyntax.SourceFile, i::Integer)
@ Base.JuliaSyntax /cache/build/builder-amdci4-6/julialang/julia-release-1-dot-10/base/JuliaSyntax/src/source_files.jl:127
[3] nextind(s::String, i::Int64)
@ strings/string.jl:171
[4] nextind(s::SubString{String}, i::Int64)
@ strings/substring.jl:104
[5] nextind(s::AbstractString, i::Int64, n::Int64)
@ strings/basic.jl:558
[6] nextind(s::AbstractString, i::Integer, n::Integer)
@ strings/basic.jl:554
[7] nextind(s::AbstractString, i::Int64)
@ strings/basic.jl:556
[8] nextind(s::AbstractString, i::Integer)
@ strings/basic.jl:555
[9] nextind(::OrderedCollections.OrderedSet, i::Int64)
@ OrderedCollections ~/.julia/packages/OrderedCollections/9C4Uz/src/ordered_set.jl:105
[10] nextind(a::AbstractArray{<:Any, N}, i::CartesianIndex{N}) where N
@ Base.IteratorsMD multidimensional.jl:149
[11] nextind(::AbstractArray, i::Integer)
@ abstractarray.jl:213
[12] nextind(t::Tuple, i::Integer)
@ tuple.jl:78
[13] nextind(t::NamedTuple, i::Integer)
@ namedtuple.jl:181
help?> nextind
search: nextind IndexCartesian MissingException current_exceptions InterruptException InvalidStateException
nextind(str::AbstractString, i::Integer, n::Integer=1) -> Int
• Case n ==1
If i is in bounds in s return the index of the start of the character whose encoding starts after index
i. In other words, if i is the start of a character, return the start of the next character; if i is
not the start of a character, move forward until the start of a character and return that index. If i
is equal to 0return1. If i is in bounds but greater or equal to lastindex(str) returnncodeunits(str)+1. Otherwise throw BoundsError.
• Case n >1
Behaves like applying n times nextind for n==1. The only difference is that if n is so large that
applying nextind would reach ncodeunits(str)+1 then each remaining iteration increases the returned
value by 1. This means that in this case nextind can return a value greater than ncodeunits(str)+1.
• Case n ==0
Return i only if i is a valid index in s or is equal to 0. Otherwise StringIndexError or BoundsError is
thrown.
The text was updated successfully, but these errors were encountered:
nextind
has a bunch of methods, only theAbstractString
one is documented. I think a genericnextind(x, i::Integer)
would be good. If that's not accepted, at least the existing methods should be documented.The text was updated successfully, but these errors were encountered: