Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Provides functions that facilitate defining textcase transformations.
To see how these can be used used, see the definitions of addTextCase
in Citeproc.Pandoc and Citproc.CslJson.
Synopsis
- data CaseTransformState
- newtype CaseTransformer = CaseTransformer {
- unCaseTransformer :: Maybe Lang -> CaseTransformState -> Text -> Text
- withUppercaseAll :: CaseTransformer
- withLowercaseAll :: CaseTransformer
- withCapitalizeWords :: CaseTransformer
- withCapitalizeFirst :: CaseTransformer
- withSentenceCase :: CaseTransformer
- withTitleCase :: CaseTransformer
Documentation
data CaseTransformState Source #
Tracks context in textcase transformations.
Instances
Show CaseTransformState Source # | |
Defined in Citeproc.CaseTransform showsPrec :: Int -> CaseTransformState -> ShowS # show :: CaseTransformState -> String # showList :: [CaseTransformState] -> ShowS # | |
Eq CaseTransformState Source # | |
Defined in Citeproc.CaseTransform (==) :: CaseTransformState -> CaseTransformState -> Bool # (/=) :: CaseTransformState -> CaseTransformState -> Bool # |
newtype CaseTransformer Source #
Wraps a function used to define textcase transformations.
CaseTransformer | |
|
withUppercaseAll :: CaseTransformer Source #
Uppercase everything.
withLowercaseAll :: CaseTransformer Source #
Lowercase everything.
withCapitalizeWords :: CaseTransformer Source #
Capitalize all words.
withCapitalizeFirst :: CaseTransformer Source #
Capitalize first letter.
withSentenceCase :: CaseTransformer Source #
Capitalize first letter of each sentence.
withTitleCase :: CaseTransformer Source #
Use title case.