This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Search and Replace in a file


Hi all,

I am looking for a function that searches and replaces a string in a
normal text file. I managed to find functions for search and replace in
a string buffer but unable to do so for a file. 

It would be something like:
SeachAndReplace(Filename, SearchString, ReplacementString)


I try to use a buffer to store the entire file contents I fear (and
encountered) stack overflow. Or if someone could help me find a
lightweight library for this :)


Thanks to all in advance
Tarun





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]