Skip to content

Commit

Permalink
Merge pull request #39 from mweastwood/master
Browse files Browse the repository at this point in the history
beginswith has been renamed to startswith
  • Loading branch information
timholy committed Jan 7, 2015
2 parents 55265a7 + 3869c70 commit 9401497
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ if VERSION < v"0.4.0-dev+2056"
end
end

if VERSION < v"0.4.0-dev+2485"
startswith = Base.beginswith
export startswith
end

function _compat(ex::Expr)
if ex.head == :call
f = ex.args[1]
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ end
@test IPv4("1.2.3.4") == ip"1.2.3.4"
@test IPv6("2001:1:2:3::1") == ip"2001:1:2:3::1"
@test isless(ip"1.2.3.4", ip"1.2.3.5")

@test startswith("abcdef","abc") == true
@test startswith("abcdef","def") == false

0 comments on commit 9401497

Please sign in to comment.