# Title Case (titlecase)
`titlecase` is a small tool and library (crate) that capitalizes English text
[according to a style][style] defined by John Gruber for post titles on his
website [Daring Fireball]. `titlecase` should run on all platforms supported
by Rust including Linux, macOS, FreeBSD, NetBSD, OpenBSD, and Windows.
[](https://cirrus-ci.com/github/wezm/titlecase)
[](https://crates.io/crates/titlecase)
[][crate-docs]
[][MIT]
## Command Line Usage
`titlecase` reads lines of text from **stdin** and prints title cased versions
to **stdout**.
### Examples
```
```
## Install
### Pre-compiled binaries
Pre-compiled binaries are available for a some platforms:
* [FreeBSD 13+ amd64](https://releases.wezm.net/titlecase/3.0.0/titlecase-3.0.0-amd64-unknown-freebsd.tar.gz)
* [Linux x86\_64](https://releases.wezm.net/titlecase/3.0.0/titlecase-3.0.0-x86_64-unknown-linux-musl.tar.gz)
* [MacOS Universal](https://releases.wezm.net/titlecase/3.0.0/titlecase-3.0.0-universal-apple-darwin.tar.gz)
* [Windows x86\_64](https://releases.wezm.net/titlecase/3.0.0/titlecase-3.0.0-x86_64-pc-windows-msvc.zip)
Example to download and extract a binary:
curl https://releases.wezm.net/titlecase/3.0.0/titlecase-3.0.0-x86_64-unknown-linux-musl.tar.gz | tar zxf -
### From Source
If you have a stable [Rust compiler toolchain][rustup] installed you can
install the most recently released `titlecase` with cargo:
cargo install titlecase
## Usage as a Rust Crate
**Minimum Supported Rust Version:** 1.70.0
See the [crate documentation][crate-docs].
## Style
Instead of simply capitalizing each word `titlecase` does the following
([amongst other things][style]):
* Lower case small words like an, of, or in.
* Don't capitalize words like iPhone.
* Don't interfere with file paths, URLs, domains, and email addresses.
* Always capitalize the first and last words, even if they are small words
or surrounded by quotes.
* Don't interfere with terms like "Q&A", or "AT&T".
* Capitalize small words after a colon.
## Credits
This tool makes use of prior work by [John Gruber][style], [Aristotle
Pagaltzis], and [David Gouch].
[Aristotle Pagaltzis]: http://plasmasturm.org/code/titlecase/
[crate-docs]: https://docs.rs/titlecase
[Daring Fireball]: https://daringfireball.net/
[David Gouch]: http://individed.com/code/to-title-case/
[MIT]: https://github.com/wezm/titlecase/blob/master/LICENSE
[rustup]: https://www.rust-lang.org/tools/install
[style]: https://daringfireball.net/2008/05/title_case