On Tue, 12 Oct 2021 at 23:02, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
On 10/12/21 13:50, Shaozhong SHI wrote:
>
>
> On Tue, 12 Oct 2021 at 20:34, Adrian Klaver <adrian.klaver@xxxxxxxxxxx
>
> Which follows the definition here:
>
> https://www.postgresql.org/docs/14/functions-string.html
> <https://www.postgresql.org/docs/14/functions-string.html>
>
> initcap ( text ) → text
>
> Converts the first letter of each word to upper case and the rest to
> lower case. Words are sequences of alphanumeric characters separated by
> non-alphanumeric characters.
>
> Hi, Adrian Klaver,
>
>
> It looks like that you replicated the error.
There is no error, initcap is doing what it is documented to.
notemachine is not two words anymore then 'online', 'bluebell',
'network' are.
>
> There must be a way to do the following.
Maybe, but as Karsten says it would involve an AI. One that understands
the mutt language that is English.
>
> a column contains a list of words. Only the first letter of each word
> should be capitalised. INITCAP can not do that. How to create a
> function just to capitalised each word (substring) in a list of
> words/strings. This will be very useful and create great impact.
From here:
https://www.grammarly.com/blog/14-of-the-longest-words-in-english/
uncopyrightable
where would you split that into words?:
Some 'words' I see:
un
unc
copy
copyright
right
table
able
>
> Regards,
>
> David
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
Hi, Adrian Klaver,
In Python, there is a capwords. Do we have an equivalent in Postgres?
Regards, David