@@ -221,7 +221,7 @@ Vector{UInt8}(s::AbstractString) = unsafe_wrap(Vector{UInt8}, String(s))
221221Array {UInt8} (s:: AbstractString ) = unsafe_wrap (Vector{UInt8}, String (s))
222222Vector {T} (s:: AbstractString ) where {T<: AbstractChar } = collect (T, s)
223223
224- Symbol (s:: AbstractString ) = Symbol (String (s))
224+ Symbol (s:: AbstractString ) = Symbol (String (s):: String )
225225Symbol (x... ) = Symbol (string (x... ))
226226
227227convert (:: Type{T} , s:: T ) where {T<: AbstractString } = s
@@ -364,7 +364,7 @@ isless(a::Symbol, b::Symbol) = cmp(a, b) < 0
364364
365365# hashing
366366
367- hash (s:: AbstractString , h:: UInt ) = hash (String (s), h)
367+ hash (s:: AbstractString , h:: UInt ) = hash (String (s):: String , h)
368368
369369# # character index arithmetic ##
370370
@@ -412,7 +412,7 @@ function length(s::AbstractString, i::Int, j::Int)
412412end
413413
414414@propagate_inbounds length (s:: AbstractString , i:: Integer , j:: Integer ) =
415- length (s, Int (i), Int (j))
415+ length (s, Int (i):: Int , Int (j):: Int )
416416
417417"""
418418 thisind(s::AbstractString, i::Integer)::Int
@@ -446,7 +446,7 @@ ERROR: BoundsError: attempt to access 2-codeunit String at index [-1]
446446[...]
447447```
448448"""
449- thisind (s:: AbstractString , i:: Integer ) = thisind (s, Int (i))
449+ thisind (s:: AbstractString , i:: Integer ) = thisind (s, Int (i):: Int )
450450
451451function thisind (s:: AbstractString , i:: Int )
452452 z = ncodeunits (s):: Int + 1
@@ -502,8 +502,8 @@ julia> prevind("α", 2, 3)
502502-1
503503```
504504"""
505- prevind (s:: AbstractString , i:: Integer , n:: Integer ) = prevind (s, Int (i), Int (n))
506- prevind (s:: AbstractString , i:: Integer ) = prevind (s, Int (i))
505+ prevind (s:: AbstractString , i:: Integer , n:: Integer ) = prevind (s, Int (i):: Int , Int (n):: Int )
506+ prevind (s:: AbstractString , i:: Integer ) = prevind (s, Int (i):: Int )
507507prevind (s:: AbstractString , i:: Int ) = prevind (s, i, 1 )
508508
509509function prevind (s:: AbstractString , i:: Int , n:: Int )
@@ -561,8 +561,8 @@ julia> nextind("α", 1, 2)
5615614
562562```
563563"""
564- nextind (s:: AbstractString , i:: Integer , n:: Integer ) = nextind (s, Int (i), Int (n))
565- nextind (s:: AbstractString , i:: Integer ) = nextind (s, Int (i))
564+ nextind (s:: AbstractString , i:: Integer , n:: Integer ) = nextind (s, Int (i):: Int , Int (n):: Int )
565+ nextind (s:: AbstractString , i:: Integer ) = nextind (s, Int (i):: Int )
566566nextind (s:: AbstractString , i:: Int ) = nextind (s, i, 1 )
567567
568568function nextind (s:: AbstractString , i:: Int , n:: Int )
@@ -757,7 +757,7 @@ julia> repeat("ha", 3)
757757"hahaha"
758758```
759759"""
760- repeat (s:: AbstractString , r:: Integer ) = repeat (String (s), r)
760+ repeat (s:: AbstractString , r:: Integer ) = repeat (String (s):: String , r)
761761
762762"""
763763 ^(s::Union{AbstractString,AbstractChar}, n::Integer)::AbstractString
0 commit comments