Delphi Clinic | C++Builder Gate | Training & Consultancy | Delphi Notes Weblog | Dr.Bob's Webshop |
|
Find the bracket!
if (s.equals("Something")) { // // Here comes the code... // } else if (s.equals(s.substring(s.indexOf("Search")))) { // // Here comes the code... // }A simple piece of code. Maybe the second if-statement looks a bit more complicated, especially the number of parentheses. Well OK, it isn't that complicated, but it will demonstrate my tip.
The same commands can be used for curly brackets.