Skip to content

Commit

Permalink
Add isletter (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmkuhn authored and ararslan committed May 16, 2018
1 parent e40a5f3 commit ddd01fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ Currently, the `@compat` macro supports the following syntaxes:
* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`,
`uppercasefirst` and `lowercasefirst` ([#26442]).

* `isalpha` is now `isletter` ([#27077]).

## New macros

* `@__DIR__` has been added ([#18380])
Expand Down Expand Up @@ -626,3 +628,4 @@ includes this fix. Find the minimum version from there.
[#26442]: https://github.com/JuliaLang/julia/issues/26442
[#26660]: https://github.com/JuliaLang/julia/issues/26660
[#26670]: https://github.com/JuliaLang/julia/issues/26670
[#27077]: https://github.com/JuliaLang/julia/issues/27077
6 changes: 6 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,12 @@ else
using LinearAlgebra: qr
end

# https://github.com/JuliaLang/julia/pull/27077
@static if VERSION < v"0.7.0-DEV.5087"
export isletter
const isletter = isalpha
end

include("deprecated.jl")

end # module Compat
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1727,4 +1727,9 @@ let A = [1 2; 1 2; 1 2]
@test f[1] * [f[2]; [0 0]] A[:,f[3]]
end

# 0.7.0-DEV.5087
@test isletter('a')
@test isletter('β')
@test !isletter('3')

nothing

0 comments on commit ddd01fd

Please sign in to comment.