Let's solve another challenge as the answer to the question that I have held numerous meetings on the Internet landscape.
Convert text in a table column in such a way that each word begins with an uppercase letter.
Here's an example of data and the desired result:
name
rep
delta
Delta
KSI PSI
Ksi Psi
alfa beta gamma zeta
Alfa Beta Gamma Zeta
ALfa and omegA
Alfa And Omega
For a few exceptions (among which may be mentioned abbreviations and initials) can be assumed that the word inside the text is preceded by a space. This can be used as a search criterion we need the elements of the text. I propose to implement a following trivial algorithm:
1. The first letter of the text makes a capital, and the rest - lower.
2. Then each "space + letter" combination translates to upper case.
From the first paragraph of the algorithm's simple:
To implement the second paragraph, there are some ways. Since the Latin alphabet is not so much (26), we can just make 26 substitutions. I was not lazy and will bring the full query so you can experiment.