[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 643
  • Last Modified:

programming style

hello,
is there a software that I can use to switch programming styles?
I've got a source code of about 600 files but need to change them.
anyone know>

>>from

if (hours < 24 && minutes < 60 && seconds < 60)
{
    return true;
}
else
{
    return false;
}

>>to

if (hours < 24 && minutes < 60 && seconds < 60) {
    return true;
} else {
    return false;
}

Open in new window

0
XK8ER
Asked:
XK8ER
  • 3
  • 2
  • 2
4 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
0
 
Dave BaldwinFixer of ProblemsCommented:
Sorry, those are for C/C++.  The only ones I found for PHP were commercial products.
0
 
Michel PlungjanIT ExpertCommented:
I would find a search/replace program and change all
)\n{ to
) {

or perhaps

)\s{
to
) {
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
XK8ERAuthor Commented:
mplungjan, how can I accomplish that? I have PowerGREP which has a feature to replace using RegEX
0
 
XK8ERAuthor Commented:
this did the trick... amazing things with RegEx

\)[ \t\r\n]+{
into
) {

else[ \t\r\n]+{
into
else {

}[ \t\r\n]+else
into
} else
0
 
Michel PlungjanIT ExpertCommented:
Great :)
0
 
Michel PlungjanIT ExpertCommented:
Answer #10,000  :)))
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now