Stringy icon indicating copy to clipboard operation
Stringy copied to clipboard

Allow hyphenated words option in titleize method.

Open leigh-ols opened this issue 6 years ago • 3 comments

At present hyphenated words such as 'up-to-date' would become 'Up-to-date'.

Allowing the option of treating hyphenated words as a individual words would be a nice feature:

s('up-to-date')->titleize(['to'], [' ', '-']);

Would return 'Up-to-Date'.

leigh-ols avatar May 13 '19 11:05 leigh-ols

@leigh-ols I added the feature in this fork, maybe you can take a look here: https://github.com/voku/Stringy/commit/84b6c1e3d82957e5213db378ad2b1d6837a4dbd1#diff-81e55517d73634753e211bc2deebe9c0R4319

voku avatar Aug 21 '19 13:08 voku

@voku Any chance of a pull request on this one? @danielstjules Would you be willing to implement this?

leigh-ols avatar Aug 21 '19 14:08 leigh-ols

@leigh-ols, this repo seems abandoned since 2017... (#198)

alexeyshockov avatar Aug 21 '19 14:08 alexeyshockov