Skip to content

Commit

Permalink
Uppercase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPJones committed Oct 4, 2018
1 parent 6dea360 commit 7c3bbc2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords = ["Characters"]
license = "MIT"
desc = "Basic functionality for Chr type"
authors = ["ScottPJones <[email protected]>"]
version = "0.1.7"
version = "0.1.8"

[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6 2-
ModuleInterfaceTools 0.1.6
StrAPI 0.1.7
StrAPI 0.1.8
CharSetEncodings 0.1.8
4 changes: 3 additions & 1 deletion src/casefold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ uppercase(ch::ASCIIChr) = _islower_a(ch) ? ASCIIChr(ch - 0x20) : ch
titlecase(ch::ASCIIChr) = uppercase(ch)

lowercase(ch::T) where {T<:LatinChars} = T(_lowercase_l(codepoint(ch)))
uppercase(ch::LatinChr) = LatinChr(_uppercase_l(codepoint(ch)))

_uppercase_latin(ch) = _can_upper(ch) ? ch - 0x20 : ch
uppercase(ch::LatinChr) = LatinChr(_uppercase_latin(codepoint(ch)))

# Special handling for case where this is just an optimization of the first 256 bytes of Unicode,
# and not the 8-bit ISO 8859-1 character set
Expand Down

0 comments on commit 7c3bbc2

Please sign in to comment.