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
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)
In a project with this large number of files, is better if you let the way it
is, doing this now you can crash the project and lost much much time.
Yuri Yarlei.
Programmer PHP, CSS, Java, PostregreSQL;
Today PHP, tomorrow Java, after the world.
Kyou wa PHP, ashita wa Java, sono ato sekai desu.
2009/7/23 Eddie Drapkin oorza...@gmail.com:
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
4 matches
Mail list logo