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
Copy file name to clipboardExpand all lines: src/deprecated.jl
+98Lines changed: 98 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,3 +56,101 @@ if VERSION < v"0.7.0-DEV.2915"
56
56
const textwidth = Compat.Unicode.textwidth
57
57
export textwidth
58
58
end
59
+
60
+
@staticifVERSION<v"0.7.0-DEV.3272"
61
+
function Base.findnext(r::Regex, s::AbstractString, idx::Integer)
62
+
Base.depwarn(string("Compat.jl's implementation of Base.findnext(r::Regex, s::AbstractString, idx::Integer) is deprecated, ",
63
+
"use Compat.findnext(r, s, idx) instead, which returns `nothing` to indicate no match."), :findnext)
64
+
search(s, r, idx)
65
+
end
66
+
function Base.findfirst(r::Regex, s::AbstractString)
67
+
Base.depwarn(string("Compat.jl's implementation of Base.findfirst(r::Regex, s::AbstractString) is deprecated, ",
68
+
"use Compat.findfirst(r, s) instead, which returns `nothing` to indicate no match."), :findfirst)
69
+
search(s, r)
70
+
end
71
+
function Base.findnext(c::EqualTo{Char}, s::AbstractString, i::Integer)
72
+
Base.depwarn(string("Compat.jl's implementation of Base.findnext(c::EqualTo{Char}, s::AbstractString, i::Integer) is deprecated, ",
73
+
"use Compat.findnext(c, s, i) instead, which returns `nothing` to indicate no match."), :findnext)
74
+
search(s, c.x, i)
75
+
end
76
+
function Base.findfirst(c::EqualTo{Char}, s::AbstractString)
77
+
Base.depwarn(string("Compat.jl's implementation of Base.findfirst(c::EqualTo{Char}, s::AbstractString) is deprecated, ",
78
+
"use Compat.findfirst(c, s) instead, which returns `nothing` to indicate no match."), :findfirst)
79
+
search(s, c.x)
80
+
end
81
+
function Base.findnext(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}}, i::Integer)
82
+
Base.depwarn(string("Compat.jl's implementation of Base.findnext(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}}, i::Integer) is deprecated, ",
83
+
"use Compat.findnext(b, a, i) instead, which returns `nothing` to indicate no match."), :findnext)
84
+
search(a, b.x, i)
85
+
end
86
+
function Base.findfirst(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}})
87
+
Base.depwarn(string("Compat.jl's implementation of Base.findfirst(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}}) is deprecated, ",
88
+
"use Compat.findfirst(b, a) instead, which returns `nothing` to indicate no match."), :findfirst)
89
+
search(a, b.x)
90
+
end
91
+
function Base.findnext(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString, i::Integer)
92
+
Base.depwarn(string("Compat.jl's implementation of Base.findnext(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString, i::Integer) is deprecated, ",
93
+
"use Compat.findnext(c, s, i) instead, which returns `nothing` to indicate no match."), :findnext)
94
+
search(s, c.x, i)
95
+
end
96
+
function Base.findfirst(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString)
97
+
Base.depwarn(string("Compat.jl's implementation of Base.findfirst(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString) is deprecated, ",
98
+
"use Compat.findfirst(c, s) instead, which returns `nothing` to indicate no match."), :findfirst)
99
+
search(s, c.x)
100
+
end
101
+
function Base.findnext(t::AbstractString, s::AbstractString, i::Integer)
102
+
Base.depwarn(string("Compat.jl's implementation of Base.findnext(t::AbstractString, s::AbstractString, i::Integer) is deprecated, ",
103
+
"use Compat.findnext(t, s, i) instead, which returns `nothing` to indicate no match."), :findnext)
104
+
search(s, t, i)
105
+
end
106
+
function Base.findfirst(t::AbstractString, s::AbstractString)
107
+
Base.depwarn(string("Compat.jl's implementation of Base.findfirst(t::AbstractString, s::AbstractString) is deprecated, ",
108
+
"use Compat.findfirst(t, s) instead, which returns `nothing` to indicate no match."), :findfirst)
109
+
search(s, t)
110
+
end
111
+
function Base.findfirst(delim::EqualTo{UInt8}, buf::Base.IOBuffer)
112
+
Base.depwarn(string("Compat.jl's implementation of Base.findfirst(delim::EqualTo{UInt8}, buf::Base.IOBuffer) is deprecated, ",
113
+
"use Compat.findfirst(delim, buf) instead, which returns `nothing` to indicate no match."), :findfirst)
114
+
search(buf, delim.x)
115
+
end
116
+
function Base.findprev(c::EqualTo{Char}, s::AbstractString, i::Integer)
117
+
Base.depwarn(string("Compat.jl's implementation of Base.findprev(c::EqualTo{Char}, s::AbstractString, i::Integer) is deprecated, ",
118
+
"use Compat.findprev(c, s, i) instead, which returns `nothing` to indicate no match."), :findprev)
119
+
rsearch(s, c.x, i)
120
+
end
121
+
function Base.findlast(c::EqualTo{Char}, s::AbstractString)
122
+
Base.depwarn(string("Compat.jl's implementation of Base.findlast(c::EqualTo{Char}, s::AbstractString) is deprecated, ",
123
+
"use Compat.findlast(c, s) instead, which returns `nothing` to indicate no match."), :findlast)
124
+
rsearch(s, c.x)
125
+
end
126
+
function Base.findprev(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}}, i::Integer)
127
+
Base.depwarn(string("Compat.jl's implementation of Base.findprev(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}}, i::Integer) is deprecated, ",
128
+
"use Compat.findprev(b, a, i) instead, which returns `nothing` to indicate no match."), :findprev)
129
+
rsearch(a, b.x, i)
130
+
end
131
+
function Base.findlast(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}})
132
+
Base.depwarn(string("Compat.jl's implementation of Base.findlast(b::EqualTo{<:Union{Int8,UInt8}}, a::Vector{<:Union{Int8,UInt8}}) is deprecated, ",
133
+
"use Compat.findlast(b, a) instead, which returns `nothing` to indicate no match."), :findlast)
134
+
rsearch(a, b.x)
135
+
end
136
+
function Base.findprev(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString, i::Integer)
137
+
Base.depwarn(string("Compat.jl's implementation of Base.findprev(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString, i::Integer) is deprecated, ",
138
+
"use Compat.findprev(c, s, i) instead, which returns `nothing` to indicate no match."), :findprev)
139
+
rsearch(s, c.x, i)
140
+
end
141
+
function Base.findlast(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString)
142
+
Base.depwarn(string("Compat.jl's implementation of Base.findlast(c::OccursIn{<:Union{Tuple{Vararg{Char}},AbstractVector{Char},Set{Char}}}, s::AbstractString) is deprecated, ",
143
+
"use Compat.findlast(c, s) instead, which returns `nothing` to indicate no match."), :findlast)
144
+
rsearch(s, c.x)
145
+
end
146
+
function Base.findprev(t::AbstractString, s::AbstractString, i::Integer)
147
+
Base.depwarn(string("Compat.jl's implementation of Base.findprev(t::AbstractString, s::AbstractString, i::Integer) is deprecated, ",
148
+
"use Compat.findprev(t, s, i) instead, which returns `nothing` to indicate no match."), :findprev)
149
+
rsearch(s, t, i)
150
+
end
151
+
function Base.findlast(t::AbstractString, s::AbstractString)
152
+
Base.depwarn(string("Compat.jl's implementation of Base.findlast(t::AbstractString, s::AbstractString) is deprecated, ",
153
+
"use Compat.findlast(t, s) instead, which returns `nothing` to indicate no match."), :findlast)
0 commit comments