registry-options-0.2.0.0: application options parsing
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Registry.Options.Text

Description

Utility functions for working with text

Synopsis

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

bracketTextWhen :: Bool -> Text -> Text Source #

Surround some text with brackets

parenthesizeText :: Text -> Text Source #

Surround some text with parentheses

parenthesizeTextWhen :: Bool -> Text -> Text Source #

Surround some text with parentheses

indent :: Text -> Text -> Text Source #

Indent some text with a fixed piece of text

trimRight :: Text -> Text Source #

Remove spaces on the right

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