titlecase: Convert English words to title case

[ bsd3, library, program, text ] [ Propose Tags ]

Capitalize all English words except articles (a, an, the), coordinating conjunctions (for, and, nor, but, or, yet, so), and prepositions (unless they begin or end the title). The prepositions are taken from this list: https://en.wikipedia.org/wiki/List_of_English_prepositions.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,, 1, 1.0.1
Dependencies base (>=4.7 && <4.9), blaze-markup, semigroups, text, titlecase [details]
License BSD-3-Clause
Copyright 2015 Nikita Karetnikov
Author Nikita Karetnikov
Maintainer nikita@karetnikov.org
Category Text
Home page https://github.com/nkaretnikov/titlecase
Bug tracker https://github.com/nkaretnikov/titlecase/issues
Source repo head: git clone https://github.com/nkaretnikov/titlecase
Uploaded by NikitaKaretnikov at 2015-11-08T15:57:08Z
Distributions LTSHaskell:1.0.1, NixOS:1.0.1, Stackage:1.0.1
Reverse Dependencies 2 direct, 1 indirect [details]
Executables titlecase
Downloads 6166 total (27 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-11-08 [all 1 reports]

Readme for titlecase-

[back to package description]

Titlecase Library for Haskell

This library basically offers a rough but mostly working function titlecase to take any Text string and capitalize it according to English Title Case. While the Data.Text function toTitle simply capitalizes the first letter of every word, this Data.Text.Titlecase titlecase function uses the list of common words to not capitalize. It then respects the rule of capitalizing the first and last words regardless.

On Hackage at https://hackage.haskell.org/package/titlecase.