File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,22 @@ protected function toCamelCase($str): string
106
106
return $ str ;
107
107
}
108
108
109
+ protected function toLowerCamelCase ($ str ): string
110
+ {
111
+ // Normalize the string to decompose accented characters
112
+ $ str = \Normalizer::normalize ($ str , \Normalizer::FORM_D );
113
+
114
+ // Remove accents and other residual non-ASCII characters
115
+ $ str = preg_replace ('/\p{M}/u ' , '' , $ str );
116
+
117
+ // Replace non-alphanumeric characters with a space
118
+ $ str = preg_replace ('/[^a-zA-Z0-9]+/ ' , ' ' , $ str );
119
+ $ str = ucwords (strtolower ($ str ));
120
+ $ str = lcfirst (str_replace (' ' , '' , $ str ));
121
+
122
+ return $ str ;
123
+ }
124
+
109
125
protected function toSnakeCase ($ str ): string
110
126
{
111
127
// Normalize the string to decompose accented characters
You can’t perform that action at this time.
0 commit comments