diff --git a/README.md b/README.md index 08d00c072..ab9ff38a4 100644 --- a/README.md +++ b/README.md @@ -382,6 +382,9 @@ Currently, the `@compat` macro supports the following syntaxes: * `LinSpace` is now `LinRange` ([#25896]). +* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`, + `uppercasefirst` and `lowercasefirst` ([#26442]). + ## New macros * `@__DIR__` has been added ([#18380]) @@ -596,3 +599,4 @@ includes this fix. Find the minimum version from there. [#26149]: https://github.com/JuliaLang/julia/issues/26149 [#26156]: https://github.com/JuliaLang/julia/issues/26156 [#26316]: https://github.com/JuliaLang/julia/issues/26316 +[#26442]: https://github.com/JuliaLang/julia/issues/26442 \ No newline at end of file diff --git a/src/Compat.jl b/src/Compat.jl index 2820859a1..35bef8b61 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -1679,6 +1679,14 @@ else const indexin = Base.indexin end +if VERSION < v"0.7.0-DEV.4585" + export isuppercase, islowercase, uppercasefirst, lowercasefirst + const isuppercase = isupper + const islowercase = islower + const uppercasefirst = ucfirst + const lowercasefirst = lcfirst +end + include("deprecated.jl") end # module Compat diff --git a/test/runtests.jl b/test/runtests.jl index b4704f912..d04a1f55b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1491,4 +1491,12 @@ end # 0.7.0-DEV.3972 @test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing] +# 0.7.0-DEV.4585 +@test isuppercase('A') +@test !isuppercase('a') +@test islowercase('a') +@test !islowercase('A') +@test uppercasefirst("qwerty") == "Qwerty" +@test lowercasefirst("Qwerty") == "qwerty" + nothing