mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Allowing digits in technical names
--HG-- branch : 1.x
This commit is contained in:
@@ -8,7 +8,7 @@ using Orchard.Localization;
|
|||||||
namespace Orchard.Utility.Extensions {
|
namespace Orchard.Utility.Extensions {
|
||||||
public static class StringExtensions {
|
public static class StringExtensions {
|
||||||
private static readonly Regex humps = new Regex("(?:^[a-zA-Z][^A-Z]*|[A-Z][^A-Z]*)");
|
private static readonly Regex humps = new Regex("(?:^[a-zA-Z][^A-Z]*|[A-Z][^A-Z]*)");
|
||||||
private static readonly Regex safe = new Regex(@"[^_\-a-zA-Z]+");
|
private static readonly Regex safe = new Regex(@"[^_\-a-zA-Z\d]+");
|
||||||
|
|
||||||
public static string CamelFriendly(this string camel) {
|
public static string CamelFriendly(this string camel) {
|
||||||
if (String.IsNullOrWhiteSpace(camel))
|
if (String.IsNullOrWhiteSpace(camel))
|
||||||
|
|||||||
Reference in New Issue
Block a user