Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Text.Titlecase.Internal
Description
As the name implies, this module is meant to be used only if
you want to get access to the internals, say, if you're unhappy
with the provided titlecase
function.
Data.Text.Titlecase.Internal doesn't prevent you from creating
improperly capitalized Titlecase
values. In any other case,
Data.Text.Titlecase is what you're looking for.
- newtype Titlecase = Titlecase {
- unTitlecase :: Text
- newtype Article = Article {}
- newtype Conjunction = Conjunction {}
- data Preposition
- toTitle :: Text -> Text
- (<#>) :: Text -> Text -> Text
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e
- isElem :: (a -> Text) -> NonEmpty a -> Text -> Bool
- isArticle :: Text -> Bool
- isOneWordPreposition :: Text -> Bool
- isConjunction :: Text -> Bool
- isTwoWordPreposition :: Text -> Text -> Bool
- isThreeWordPreposition :: Text -> Text -> Text -> Bool
- isFourWordPreposition :: Text -> Text -> Text -> Text -> Bool
- unPreposition :: Preposition -> Text
- articles :: NonEmpty Article
- conjunctions :: NonEmpty Conjunction
- prepositions :: NonEmpty Preposition
- oneWordPrepositions :: NonEmpty Preposition
- twoWordPrepositions :: NonEmpty Preposition
- threeWordPrepositions :: NonEmpty Preposition
- fourWordPrepositions :: NonEmpty Preposition
Types
Constructors
Titlecase | |
Fields
|
data Preposition Source
Constructors
OneWordPreposition Text | |
TwoWordPreposition Text Text | |
ThreeWordPreposition Text Text Text | |
FourWordPreposition Text Text Text Text |
Instances
Helpers
toTitle :: Text -> Text Source
Capitalize the first character. Note that this function behaves
differently than toTitle
.
isOneWordPreposition :: Text -> Bool Source
isConjunction :: Text -> Bool Source
isTwoWordPreposition :: Text -> Text -> Bool Source
unPreposition :: Preposition -> Text Source