From 033c66d10222a139a8533120a5e47289d62a79af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Duarte?= Date: Fri, 16 Oct 2020 14:14:03 -0300 Subject: [PATCH] Small improvement --- sources/MVCFramework.Commons.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/MVCFramework.Commons.pas b/sources/MVCFramework.Commons.pas index 6c3543743..672f39383 100644 --- a/sources/MVCFramework.Commons.pas +++ b/sources/MVCFramework.Commons.pas @@ -1441,7 +1441,7 @@ function CamelCase(const Value: string; const MakeFirstUpperToo: Boolean): strin function SnakeCase(const Value: string): string; begin // Convert multiple underlines to just one - Result := TRegex.Replace(Value, '([_][_{1}]+)', '_'); + Result := TRegex.Replace(Value, '([_][_]+)', '_'); // Adds underscores between a lowercase character and an uppercase character Result := TRegex.Replace(Result, '([a-z0-9])([A-Z])', '\1_\2'); Result := Result.ToLower;