-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A converter for spinal, snake and camel cases
--   
--   A parser-based converter library for spinal, snake and camel cases.
@package cases
@version 0.1.3.2

module Cases

-- | Extract separate words from an arbitrary text using a smart parser and
--   produce a new text using case transformation and delimiter functions.
--   
--   Note: to skip case transformation use the <a>id</a> function.
process :: CaseTransformer -> Delimiter -> Text -> Text
type CaseTransformer = Part -> Part
lower :: CaseTransformer
upper :: CaseTransformer
title :: CaseTransformer
type Delimiter = Folder (Maybe Text)
spinal :: Delimiter
snake :: Delimiter
camel :: Delimiter

-- | Transform an arbitrary text into a lower spinal case.
--   
--   Same as <tt>(<a>process</a> <a>lower</a> <a>spinal</a>)</tt>.
spinalize :: Text -> Text

-- | Transform an arbitrary text into a lower snake case.
--   
--   Same as <tt>(<a>process</a> <a>lower</a> <a>snake</a>)</tt>.
snakify :: Text -> Text

-- | Transform an arbitrary text into a camel case, while preserving the
--   case of the first character.
--   
--   Same as <tt>(<a>process</a> <a>id</a> <a>camel</a>)</tt>.
camelize :: Text -> Text
