2009/7/23 Eddie Drapkin :
> Hey all,
> we've got a repository here at work, with something like 55,000 files
> in it. For the last few years, we've been naming $variables_like_this
> and functions_the_same($way_too). And now we've decided to switch to
> camelCasing everything and I've been tasked
.
> Date: Thu, 23 Jul 2009 12:56:51 -0400
> From: oorza...@gmail.com
> To: php-general@lists.php.net
> Subject: [PHP] Renaming all variables in a repository
>
> Hey all,
> we've got a repository here at work, with something like 55,000 files
> in it. For the last
function toCamelCase( $string )
{
return str_replace( ' ' , '', ucwords( strtolower( strtr($string, '_',
' ') ) ));
}
echo toCamelCase( 'this_is_not_properly_written' );
You can use this simplest function to translate a string to camelCase.
The process could be...
1) parse by PHP
2) transl
Eddie Drapkin wrote:
Hey all,
we've got a repository here at work, with something like 55,000 files
in it. For the last few years, we've been naming $variables_like_this
and functions_the_same($way_too). And now we've decided to switch to
camelCasing everything and I've been tasked with someho
Hey all,
we've got a repository here at work, with something like 55,000 files
in it. For the last few years, we've been naming $variables_like_this
and functions_the_same($way_too). And now we've decided to switch to
camelCasing everything and I've been tasked with somehow determining
if it's pos
5 matches
Mail list logo