26-02-20 10:11 AM
Hi all,
Does anyone know a simple way to convert a text data item so that every letter after a space is a capital letter and the rest is lowercase? The data item could be made up of 1/2/3/4 etc words and could either already be in this format or could be all upper or all lower case.
Thanks.
26-02-20 12:20 PM
26-02-20 01:45 PM
26-02-20 05:35 PM
27-02-20 08:24 AM
27-02-20 02:29 PM
Result = System.Text.RegularExpressions.Regex.Replace(<your_string_here>, "(?<= )\w", Function(m) m.Value.ToUpper())
I'd personally go with Dave's solution as I try to avoid code stages for one-off pieces and there's not much reuse value with this solution.