Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Utility functions for working with text
Synopsis
- camelCaseToHyphenated :: Text -> Text
- hyphenatedToCamelCase :: Text -> Text
- dropQualifier :: Text -> Text
- dropPrefix :: Text -> Text
- splitCamelCase :: Text -> [Text]
- isCapitalized :: Text -> Bool
- displayColumns :: [Text] -> [Text] -> [Text]
- bracketText :: Text -> Text
- bracketTextWhen :: Bool -> Text -> Text
- parenthesizeText :: Text -> Text
- parenthesizeTextWhen :: Bool -> Text -> Text
- indent :: Text -> Text -> Text
- trimRight :: Text -> Text
- underscoreToCamelCase :: Text -> Text
- camelCaseToUnderscore :: Text -> Text
- underscoreToHyphenated :: Text -> Text
- hyphenatedToUnderscore :: Text -> Text
Documentation
camelCaseToHyphenated :: Text -> Text Source #
Hyphenate a camelCase Text into camel-case
hyphenatedToCamelCase :: Text -> Text Source #
camelCase some hyphenated Text
dropQualifier :: Text -> Text Source #
Drop the leading names in a qualified name dropQualifier "x.y.z" === "z"
dropPrefix :: Text -> Text Source #
Drop the prefix of a capitalized or uncapitalized name dropPrefix Prefix = Prefix dropPrefix PrefixName = Name dropPrefix prefixName = Name
splitCamelCase :: Text -> [Text] Source #
Split a camel cased word in several lower-cased strings
isCapitalized :: Text -> Bool Source #
Return True if some text starts with a capital letter
displayColumns :: [Text] -> [Text] -> [Text] Source #
Display 2 columns of text so that the texts in the second column are aligned
bracketText :: Text -> Text Source #
Surround some text with brackets
parenthesizeText :: Text -> Text Source #
Surround some text with parentheses
underscoreToCamelCase :: Text -> Text Source #
Transform an underscore name to a camelcase one
camelCaseToUnderscore :: Text -> Text Source #
Transform a camelcase name to an underscore one
underscoreToHyphenated :: Text -> Text Source #
Transform an underscore name to a hyphenated one
hyphenatedToUnderscore :: Text -> Text Source #
Transform a hyphenated name to an underscore one