Logic to on Title Case words with no vowels
This commit is contained in:
parent
e9cce23bf1
commit
4701474068
@ -930,6 +930,9 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
if (Regex.IsMatch(m.Value, @"^[A-Za-z]+\.?$"))
|
||||
{
|
||||
// don't title case "words" that have no vowles
|
||||
if (Regex.IsMatch(m.Value.ToUpper(), @"^[BCDFGHJKLMNPQRSTVWXZ]+\.?$"))
|
||||
return m.Value;
|
||||
string part1 = m.Value.Substring(0, 1);
|
||||
string part2 = m.Value.Substring(1);
|
||||
return part1.ToUpper() + part2.ToLower();
|
||||
|
Loading…
x
Reference in New Issue
Block a user