Skip to content

Commit

Permalink
Update per comments on use of ?:
Browse files Browse the repository at this point in the history
Add newline

Fix indentation (Emacs and tabs)
  • Loading branch information
ScottPJones committed Dec 14, 2015
1 parent 16c3051 commit 1010f09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion base/unicode/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const c2t = [NotAssignedChar, UpperCase, LowerCase, TitleCase, ModifierLetter, O
InitialQuotePunctuation, FinalQuotePunctuation, OtherPunctuation,
MathSymbol, CurrencySymbol, ModifierSymbol, OtherSymbol,
SpaceSeparator, LineSeparator, ParagraphSeparator,
ControlChar, FormatChar, SurrogateChar, PrivateUseChar]
ControlChar, FormatChar, SurrogateChar, PrivateUseChar]

Base.convert(::Type{General}, cat::Code) = c2t[Int(cat)+1]

Expand Down
21 changes: 15 additions & 6 deletions base/unicode/utf8proc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,21 @@ normalize_string(s::AbstractString, nf::Symbol) =

charwidth(c::Char) = Int(ccall(:utf8proc_charwidth, Cint, (UInt32,), c))

lowercase(c::Char) = (isascii(c)
? ('A' <= c <= 'Z' ? c + 0x20 : c)
: Char(ccall(:utf8proc_tolower, UInt32, (UInt32,), c)))
uppercase(c::Char) = (isascii(c)
? ('a' <= c <= 'z' ? c - 0x20 : c)
: Char(ccall(:utf8proc_toupper, UInt32, (UInt32,), c)))
function lowercase(c::Char)
if isascii(c)
'A' <= c <= 'Z' ? c + 0x20 : c
else
Char(ccall(:utf8proc_tolower, UInt32, (UInt32,), c))
end
end

function uppercase(c::Char)
if isascii(c)
'a' <= c <= 'z' ? c - 0x20 : c
else
Char(ccall(:utf8proc_toupper, UInt32, (UInt32,), c))
end
end

############################################################################

Expand Down

0 comments on commit 1010f09

Please sign in to comment.