toupper
Convert a letter to the corresponding upper-case letter, if any. Any
other character is returned unchanged.
O(n) Convert a string to upper case, using simple case
conversion.
The result string may be longer than the input string. For instance,
the German "ß" (eszett, U+00DF) maps to the two-letter sequence "SS".
O(n) Convert a string to upper case, using simple case
conversion. The result string may be longer than the input string. For
instance, the German eszett (U+00DF) maps to the two-letter sequence
SS.
Properties
unstream . toUpper . stream = toUpper
O(n) Convert a string to upper case, using simple case
conversion.
The result string may be longer than the input string. For instance,
the German eszett (U+00DF) maps to the two-letter sequence SS.
O(n) Convert a string to upper case, using simple case
conversion. Subject to fusion.
The result string may be longer than the input string. For instance,
the German "ß" (eszett, U+00DF) maps to the two-letter sequence "SS".
O(n) Convert a string to upper case, using simple case
conversion. Subject to fusion.
The result string may be longer than the input string. For instance,
the German eszett (U+00DF) maps to the two-letter sequence SS.
Convert a textual sequence to upper-case.
> toUpper "hello world"
"HELLO WORLD"
Micro sign/mu (0xb5) and small letter Y with diaeresis (0xff) remain
the same.
Micro sign/mu (0xb5) and small letter Y with diaeresis (0xff) remain
the same.
O(n) Convert a string to upper case, using simple case
conversion. Subject to fusion.
The result string may be longer than the input string. For instance,
the German "ß" (eszett, U+00DF) maps to the two-letter sequence "SS".
Uppercase the characters in a string.
Casing is locale dependent and context sensitive. The result may be
longer or shorter than the original.
Convert a letter to the corresponding upper-case letter, if any. Any
other character is returned unchanged.
It uses the character property
Simple_Uppercase_Mapping.
See:
upperCaseMapping and
toUpperString for
full
upper case conversion.
toUpper c == Data.Char.toUpper c
Map upper-case ASCII letters to the corresponding lower-case letters,
leaving other characters as is.
Map upper-case Latin-1 letters to the corresponding lower-case
letters, leaving other characters as is.
Convert to upper-case. Only works for the Latin1 subset, otherwise
returns its argument unchanged.
>>> prove $ \c -> toUpperL1 (toUpperL1 c) .== toUpperL1 c
Q.E.D.
>>> prove $ \c -> isUpperL1 c .=> toUpperL1 (toLowerL1 c) .== c
Q.E.D.
Convert a character to full
upper case if defined, else to
itself.
The result string may have more than one character. For instance, the
German “ß” (
U+00DF Eszett) maps to the two-letter sequence
“SS”.
It uses the character property
Uppercase_Mapping.
See:
toUpper for
simple upper case conversion.
toUpperString c == foldMap toUpperString (toUpperString c)
Map the encodings of upper-case ASCII letters to the encodings of the
corresponding lower-case letters, leaving other bytes as is.
Map the encodings of upper-case Latin-1 letters to the encodings of
the corresponding lower-case letters, leaving other bytes as is.