Updated StringExtension.cs - CamelFriendly method

Made it more obvious how CamelFriendly was choosing to enter spaces in a string

Done on behalf of Radio Systems Corporation
This commit is contained in:
Ryan Kelso
2015-09-10 11:11:23 -04:00
parent c5d1f2d7e8
commit 57ad6190f8

View File

@@ -17,7 +17,7 @@ namespace Orchard.Utility.Extensions {
for (int i = camel.Length-1; i>0; i--) {
var current = sb[i];
if('A' <= current && current <= 'Z') {
if(char.IsUpper(current)) {
sb.Insert(i, ' ');
}
}
@@ -357,4 +357,4 @@ namespace Orchard.Utility.Extensions {
return Encoding.UTF8.GetString(Convert.FromBase64String(value));
}
}
}
}