pboy icon indicating copy to clipboard operation
pboy copied to clipboard

apply toLower before titlecase

Open kepler471 opened this issue 3 years ago • 2 comments

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).

kepler471 avatar Dec 27 '21 04:12 kepler471

Here's a test file this.

kepler471 avatar Dec 27 '21 05:12 kepler471

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.

kepler471 avatar Dec 27 '21 05:12 kepler471