Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Case is a property of letters. A-Z are upper case letters, and a-z are lower case letters. No other ASCII characters have case.
Documentation
UpperCase | The letters from |
LowerCase | The letters from |
Instances
Data Case Source # | |
Defined in ASCII.Case gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Case -> c Case # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Case # dataTypeOf :: Case -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Case) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Case) # gmapT :: (forall b. Data b => b -> b) -> Case -> Case # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Case -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Case -> r # gmapQ :: (forall d. Data d => d -> u) -> Case -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Case -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Case -> m Case # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Case -> m Case # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Case -> m Case # | |
Bounded Case Source # | |
Enum Case Source # | |
Generic Case Source # | |
Show Case Source # | |
Eq Case Source # | |
Ord Case Source # | |
Hashable Case Source # | |
Defined in ASCII.Case | |
type Rep Case Source # | |
letterCase :: Char -> Maybe Case Source #
Determines whether a character is a letter, and if so, whether it is upper or lower case.
>>>
map letterCase [CapitalLetterR, SmallLetterR, DollarSign]
[Just UpperCase,Just LowerCase,Nothing]
isCase :: Case -> Char -> Bool Source #
Determines whether a character is a letter of a particular case.
>>>
map (isCase UpperCase) [CapitalLetterR,SmallLetterR,DollarSign]
[True,False,False]
toCase :: Case -> Char -> Char Source #
Maps a letter character to its upper/lower case equivalent.
>>>
toCase UpperCase SmallLetterX
CapitalLetterX
>>>
toCase LowerCase CapitalLetterF
SmallLetterF
Characters that are already in the requested case are unmodified by this transformation.
>>>
toCase UpperCase CapitalLetterA
CapitalLetterA
Characters that are not letters, such as exclamation mark, are unmodified by this transformation.
>>>
toCase UpperCase ExclamationMark
ExclamationMark