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]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 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
Executables titlecase
Downloads 5771 total (20 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-11-08 [all 1 reports]

Readme for titlecase-0.1.0.2

[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.