mirror of
https://github.com/typeable/inflections-hs.git
synced 2024-09-11 06:05:33 +03:00
Merge pull request #46 from rcook/rcook-fix-typo
Fixes #45: Update doc comment for titleize to indicate that it capitalizes all words
This commit is contained in:
commit
f103a07970
@ -17,7 +17,7 @@ import Data.Text (Text)
|
|||||||
import Text.Inflections.Types
|
import Text.Inflections.Types
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
||||||
-- | Capitalize all the Words in the input list.
|
-- | Capitalize all the 'SomeWord' words in the input list.
|
||||||
--
|
--
|
||||||
-- >>> foo <- SomeWord <$> mkWord "foo"
|
-- >>> foo <- SomeWord <$> mkWord "foo"
|
||||||
-- >>> bar <- SomeWord <$> mkAcronym "bar"
|
-- >>> bar <- SomeWord <$> mkAcronym "bar"
|
||||||
@ -25,6 +25,6 @@ import qualified Data.Text as T
|
|||||||
-- >>> titleize [foo,bar,bazz]
|
-- >>> titleize [foo,bar,bazz]
|
||||||
-- "Foo bar Bazz"
|
-- "Foo bar Bazz"
|
||||||
titleize
|
titleize
|
||||||
:: [SomeWord] -- ^ List of words, first of which will be capitalized
|
:: [SomeWord] -- ^ List of words, of which all 'SomeWord' words will be capitalized and all acronyms will be left as is
|
||||||
-> Text -- ^ The titleized 'Text'
|
-> Text -- ^ The titleized 'Text'
|
||||||
titleize = T.unwords . fmap (unSomeWord T.toTitle)
|
titleize = T.unwords . fmap (unSomeWord T.toTitle)
|
||||||
|
Loading…
Reference in New Issue
Block a user