pboy
pboy copied to clipboard
apply toLower before titlecase
Addresses #53 .
I have applied toLower
before titlecase
.
There may be cleaner ways to do this, but I had to pack
and unpack
for the data to be Text
, for toLower
.
& T.pack
& T.toLower
& T.unpack
A potential issue may be with toLower
changing the string. From the source,
The result string may be longer than the input string. For instance, "İ" (Latin capital letter I with dot above, U+0130) maps to the sequence "i" (Latin small letter i, U+0069) followed by " ̇" (combining dot above, U+0307).
Here's a test file this.
This will blindly change all text, so if a suggestion is/contains an acronym, or something else intentionally fully capitalised, then the result will be need to be edited.
The change could instead be a new button, which lowers and titlecases the new filename. In this way, the user can decide to format the text only if they need to.