@@ -767,13 +767,13 @@ function insert!{T}(a::Array{T,1}, i::Integer, item)
767767end
768768
769769"""
770- deleteat !(a::Vector, i::Integer)
770+ delete !(a::Vector, i::Integer)
771771
772772Remove the item at the given `i` and return the modified `a`. Subsequent items
773773are shifted to fill the resulting gap.
774774
775775```jldoctest
776- julia> deleteat !([6, 5, 4, 3, 2, 1], 2)
776+ julia> delete !([6, 5, 4, 3, 2, 1], 2)
7777775-element Array{Int64,1}:
778778 6
779779 4
@@ -782,34 +782,34 @@ julia> deleteat!([6, 5, 4, 3, 2, 1], 2)
782782 1
783783```
784784"""
785- deleteat ! (a:: Vector , i:: Integer ) = (_deleteat! (a, i, 1 ); a)
785+ delete ! (a:: Vector , i:: Integer ) = (_deleteat! (a, i, 1 ); a)
786786
787- function deleteat !{T<:Integer} (a:: Vector , r:: UnitRange{T} )
787+ function delete !{T<:Integer} (a:: Vector , r:: UnitRange{T} )
788788 n = length (a)
789789 isempty (r) || _deleteat! (a, first (r), length (r))
790790 return a
791791end
792792
793793"""
794- deleteat !(a::Vector, inds)
794+ delete !(a::Vector, inds)
795795
796796Remove the items at the indices given by `inds`, and return the modified `a`.
797797Subsequent items are shifted to fill the resulting gap. `inds` must be sorted and unique.
798798
799799```jldoctest
800- julia> deleteat !([6, 5, 4, 3, 2, 1], 1:2:5)
800+ julia> delete !([6, 5, 4, 3, 2, 1], 1:2:5)
8018013-element Array{Int64,1}:
802802 5
803803 3
804804 1
805805
806- julia> deleteat !([6, 5, 4, 3, 2, 1], (2, 2))
806+ julia> delete !([6, 5, 4, 3, 2, 1], (2, 2))
807807ERROR: ArgumentError: indices must be unique and sorted
808808Stacktrace:
809- [1] deleteat !(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:808
809+ [1] delete !(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:822
810810```
811811"""
812- function deleteat ! (a:: Vector , inds)
812+ function delete ! (a:: Vector , inds)
813813 n = length (a)
814814 s = start (inds)
815815 done (inds, s) && return a
@@ -938,7 +938,7 @@ function splice!{T<:Integer}(a::Vector, r::UnitRange{T}, ins=_default_splice)
938938 v = a[r]
939939 m = length (ins)
940940 if m == 0
941- deleteat ! (a, r)
941+ delete ! (a, r)
942942 return v
943943 end
944944
@@ -1746,7 +1746,7 @@ function filter!(f, a::Vector)
17461746 insrt += 1
17471747 end
17481748 end
1749- deleteat ! (a, insrt: length (a))
1749+ delete ! (a, insrt: length (a))
17501750 return a
17511751end
17521752
0 commit comments