We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get(string, index, default)
1 parent 0737032 commit 0aadeaaCopy full SHA for 0aadeaa
base/strings/basic.jl
@@ -39,6 +39,7 @@ getindex(s::AbstractString, v::AbstractVector{<:Integer}) =
39
getindex(s::AbstractString, v::AbstractVector{Bool}) =
40
throw(ArgumentError("logical indexing not supported for strings"))
41
42
+get(s::AbstractString, i::Integer, default) = isvalid(s,i) ? s[i] : default
43
Symbol(s::AbstractString) = Symbol(String(s))
44
45
"""
0 commit comments