git.iko.soy/typeable/inflections-hs
on master help sign in
Fixes #45: Update doc comment for titleize to indicate that it capitalizes all words
commit99c57706a965c1c1c93f3a02a2578fea2ed3ab81 authorRichard Cook <rcook@rcook.org> dateFri 21 Jul 2017, 20:45 (9 years ago) parent8d7c0be
1 file changed+2−2
Text/Inflections/Titleize.hs+2−2
Text/Inflections/Titleize.hs+2−2
@@ -17,7 +17,7 @@ import Data.Text (Text)
1717import Text.Inflections.Types
1818import qualified Data.Text as T
1919
20−-- | Capitalize all the Words in the input list.
20+-- | Capitalize all the 'SomeWord' words in the input list.
2121--
2222-- >>> foo <- SomeWord <$> mkWord "foo"
2323-- >>> bar <- SomeWord <$> mkAcronym "bar"
@@ -25,6 +25,6 @@ import qualified Data.Text as T
2525-- >>> titleize [foo,bar,bazz]
2626-- "Foo bar Bazz"
2727titleize
28− :: [SomeWord] -- ^ List of words, first of which will be capitalized
28+ :: [SomeWord] -- ^ List of words, of which all 'SomeWord' words will be capitalized and all acronyms will be left as is
2929 -> Text -- ^ The titleized 'Text'
3030titleize = T.unwords . fmap (unSomeWord T.toTitle)