Skip to content

Commit ddd01fd

Browse files
jmkuhnararslan
authored andcommitted
Add isletter (#542)
1 parent e40a5f3 commit ddd01fd

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ Currently, the `@compat` macro supports the following syntaxes:
403403
* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`,
404404
`uppercasefirst` and `lowercasefirst` ([#26442]).
405405

406+
* `isalpha` is now `isletter` ([#27077]).
407+
406408
## New macros
407409

408410
* `@__DIR__` has been added ([#18380])
@@ -626,3 +628,4 @@ includes this fix. Find the minimum version from there.
626628
[#26442]: https://github.com/JuliaLang/julia/issues/26442
627629
[#26660]: https://github.com/JuliaLang/julia/issues/26660
628630
[#26670]: https://github.com/JuliaLang/julia/issues/26670
631+
[#27077]: https://github.com/JuliaLang/julia/issues/27077

src/Compat.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,6 +1842,12 @@ else
18421842
using LinearAlgebra: qr
18431843
end
18441844

1845+
# https://github.com/JuliaLang/julia/pull/27077
1846+
@static if VERSION < v"0.7.0-DEV.5087"
1847+
export isletter
1848+
const isletter = isalpha
1849+
end
1850+
18451851
include("deprecated.jl")
18461852

18471853
end # module Compat

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,4 +1727,9 @@ let A = [1 2; 1 2; 1 2]
17271727
@test f[1] * [f[2]; [0 0]] A[:,f[3]]
17281728
end
17291729

1730+
# 0.7.0-DEV.5087
1731+
@test isletter('a')
1732+
@test isletter('β')
1733+
@test !isletter('3')
1734+
17301735
nothing

0 commit comments

Comments
 (0)