I have a text file that the users can edit with many strings, I would like to have all the first letters uppercase except for words with <= 3 characters that must be all uppercase.
using LINQPAD I read the txt file like this
var textFile = File.ReadAllText(@"C:\...\...\...\...\uppercase.txt");
example of a file :
THE PEN IS ON THE TABLE
The cat is UNder ThE Table
The ChiLDreN Are ON The trampoline
Wanted output:
THE PEN IS ON THE Table
THE CAT IS Under THE Table
THE Children ARE ON THE Trampoline
You can use this approach: