Skip to content

Fix the description of toTitle - #720

Merged
Lysxia merged 1 commit into
haskell:masterfrom
swinilohani616-dot:totitle-docs
Nov 19, 2026
Merged

Lysxia merged 1 commit into
haskell:masterfrom
swinilohani616-dot:totitle-docs

Conversation

@swinilohani616-dot

Copy link
Copy Markdown
Contributor

The documentation said that every letter following a non-letter is title cased, but toTitle only title cases the first letter of each white-space separated word, so "hello-world" becomes "Hello-world". Describe the actual behaviour, add a couple of examples, and include the reference implementation the tests check toTitle against for ASCII input, for both the strict and lazy modules.

Fixes #291

The documentation said that every letter following a non-letter is
title cased, but toTitle only title cases the first letter of each
white-space separated word, so "hello-world" becomes "Hello-world".
Describe the actual behaviour, add a couple of examples, and include
the reference implementation the tests check toTitle against for ASCII
input, for both the strict and lazy modules.

Fixes haskell#291
@Lysxia
Lysxia merged commit 26941be into haskell:master Nov 19, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation of toTitle needs update

3 participants