Closed christippett closed 1 month ago
Yes, I plan to review the unicode
extension and change the underlying implementation to enable the title
function. Probably later this year.
Brilliant! Thanks for the update, I look forward to it.
Works well from my limited testing. I added the following two test cases to my local fork, the first passes but the second fails. Other title()
implementations also don't handle this second case, so it's not unexpected.
select '27_07', text_title('conan o''brien') = 'Conan O''Brien';
select '27_08', text_title('ronald mcDonald') = 'Ronald McDonald';
Thanks for trying! text_title
will capitalize the characters on word boundaries and lowercase the rest. In mcDonald
there is no word boundary before d
, hence Mcdonald
.
I've been on the lookout for an extension that would allow for converting text to title case. I was intrigued to find that alongside
upper
andlower
in the unicode library, there's also atitle
function defined (albeit commented out).I tried compiling the extension with
SQLITE3_UNICODE_TITLE
enabled, however the resulting functionality doesn't work as intended – all it does is convert everything to uppercase (probably why it's commented out!).I appreciate it's likely to be far down your list of priorities, but is there any chance we might see this functionality resurrected and included in a future
sqlean
release?