Skip to content

Commit

Permalink
Update Str.php
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Oct 18, 2024
1 parent 7c3ad8d commit ae6b0cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mako/utility/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static function pluralize(string $noun, ?int $count = null): string
*/
public static function camelToSnake(string $string): string
{
return mb_strtolower(preg_replace('/([^A-Z])([A-Z])/u', '$1_$2', $string));
return mb_strtolower(preg_replace('/([a-z])([A-Z])/u', '$1_$2', $string));
}

/**
Expand Down

0 comments on commit ae6b0cf

Please sign in to comment.