Using search and replace to rename a method
5 Dec 2011
It's easy to rename a method using Aba Search and Replace:
- enter the current and the new names,
- turn on the Match whole word and Match case modes,
- review the found occurrences;
- press the Replace button.
The name of a method, GetFileSize, collided with the name of a Win32 API function, so I wanted to replace it with GetSize. The later is also shorter and avoids the tautology: file.GetFileSize.
To find the references to my method, not to the Win32 API function, I added a dot (and
-> in C++):
In a PHP code, I replaced all calls to
sqlite_escape_string when porting my site to SQLite. The two functions escape quotes differently; addslashes should never be used in SQLite.
This is a blog about Aba Search and Replace, a tool for replacing text in multiple files.