titleize capitalising ‘a’, ‘of’, ‘the’
Closed this issue · 3 comments
How might these be excluded?
https://github.com/danielstjules/Stringy#titleize-array-ignore
Hi Joshua,
Would this be satisfying?
https://github.com/ICanBoogie/Inflector/tree/filtering_titleize
Cheers, Olivier!
That’s working with the exception of the “X-Men: The Last Stand”. The tests are technically incorrect, allowing/checking for a lowercase “The” and unhyphenated “X-Men”.
To resolve the capitalisation of “The” I might split the string by various characters (i.e. full-stop, colons, and dashes) before parsing.
The hyphen should really be maintained in every instance that I can think of. Was that intentionally removed?
P.s. I’d submit a pull request but I’m a bit pushed for time this week. Give me a shout if I can help.
Hi @joshuabaker, we forgot to celebrate the anniversary of this issue ;) I'll close it for now. Feel free to open it again.