C++ Builder is easy to operate on files on Windows. There are many methods to operate on files. Some of these methods are explained well in Windows File Operations in Modern C++. In this post we create a snippet to search and count a text from a text file.
unsigned int count_text(UnicodeString text, UnicodeString filename)
{
if(FileExists(filename))
{
UnicodeString us;
unsigned int…