Is there a way to replace any keyword in a text file using POSIX calls without re-creating the file. If so, tell me how to do it.
Thanks in advance.
If the text and the replacement are the same size, you can open it using r+ mode, search, and then write. If their sizes are different, then there is no way to replace them without recreation.
r+
Source: https://habr.com/ru/post/1332892/More articles:Canonical URLs and Google - seoWhat type of path to store in a MySQL database? - sqlPHP cURL, memory leak when using CURLOPT_RETURNTRANSFER - phpreplace string in c ++ file - c ++What is RevertToSelf ()? - C # .net - c #String to Double in Java - javaMagick ++ in VS2010 - unresolved external character - c ++Reading and adding from / to a file using std :: fstream - c ++WPF launches datagrid to hide / show columns according to bindings - wpfOpen XML SDK - Adding a Macro Programmatically to a Word 2007 Document - vstoAll Articles