diff --git a/base/strings/unicode.jl b/base/strings/unicode.jl index d6b3e708beda0..61d5aa7b6e074 100644 --- a/base/strings/unicode.jl +++ b/base/strings/unicode.jl @@ -314,7 +314,11 @@ function isupper(c::AbstractChar) cat == UTF8PROC_CATEGORY_LU || cat == UTF8PROC_CATEGORY_LT end -# Documented in Unicode module +""" + iscased(c::AbstractChar) -> Bool + +Tests whether a character is cased, i.e. is lower-, upper- or title-cased. +""" function iscased(c::AbstractChar) cat = category_code(c) return cat == UTF8PROC_CATEGORY_LU || diff --git a/stdlib/Unicode/src/Unicode.jl b/stdlib/Unicode/src/Unicode.jl index fa220f4cc24fd..06eab502f1e54 100644 --- a/stdlib/Unicode/src/Unicode.jl +++ b/stdlib/Unicode/src/Unicode.jl @@ -73,13 +73,6 @@ true """ isassigned(c) = Base.Unicode.isassigned(c) -""" - iscased(c::AbstractChar) -> Bool - -Tests whether a character is cased, i.e. is lower-, upper- or title-cased. -""" -iscased(c::AbstractChar) = Base.Unicode.iscased(c) - """ graphemes(s::AbstractString) -> GraphemeIterator diff --git a/stdlib/Unicode/test/runtests.jl b/stdlib/Unicode/test/runtests.jl index 347ad23f77cf3..ccdb4edb393a8 100644 --- a/stdlib/Unicode/test/runtests.jl +++ b/stdlib/Unicode/test/runtests.jl @@ -2,7 +2,7 @@ using Test using Unicode -using Unicode: normalize, isassigned, iscased +using Unicode: normalize, isassigned @testset "string normalization" begin # normalize (Unicode normalization etc.): @@ -376,7 +376,7 @@ end @test titlecase("abcD EFG\n\thij", strict=true) == "Abcd Efg\n\tHij" @test titlecase("abcD EFG\n\thij", strict=false) == "AbcD EFG\n\tHij" @test titlecase("abc-def") == "Abc-Def" - @test titlecase("abc-def", wordsep = !iscased) == "Abc-Def" + @test titlecase("abc-def", wordsep = !Base.Unicode.iscased) == "Abc-Def" @test titlecase("abc-def", wordsep = isspace) == "Abc-def" end end