Editing text file in c 
Author Message
 Editing text file in c

Where i can find some functions to editing text file ... such as deleting
rows containing certain words or replacing strings ...

Special thanks from Italy
Emanuele Frontoni



Sat, 07 Aug 2004 20:32:08 GMT  
 Editing text file in c

Quote:
> Where i can find some functions to editing text file ... such as deleting
> rows containing certain words or replacing strings ...

I'm not sure about whether there are any functions out there
that can probably do what you achieve for your plattform, but
I'm pretty sure, NO, I'm really sure that there is no standard
library functions to do it for you. The usual way people go when
editing a file is, either reading line by line and writing to a
new file, or read the whole file into memory, edit in memory
and than write to either the old file or a new one.

--

"LISP  is worth learning for  the profound enlightenment  experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days."   -- Eric S. Raymond



Sat, 07 Aug 2004 21:25:32 GMT  
 Editing text file in c


Quote:
> Where i can find some functions to editing text file ... such as deleting
> rows containing certain words or replacing strings ...

Write code to copy the file to another (temporary)
file, skipping over data you want 'deleted', close
both files, delete the original file, and rename
the temporary file with the name of the original.

Since you (or whoever gave you the specifications for
your program) are the one who defines and controls
the file's format, of course neither the language nor
its library could possibly provide 'ready made' functions
for such tasks.

-Mike



Sun, 08 Aug 2004 03:08:03 GMT  
 Editing text file in c
On Tue, 19 Feb 2002 12:32:08 GMT, "Emanuele Frontoni"

Quote:

>Where i can find some functions to editing text file ... such as deleting
>rows containing certain words or replacing strings ...

>Special thanks from Italy
>Emanuele Frontoni

FAQ:
        12.30
        19.13
        19.14
and others.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>



Sun, 08 Aug 2004 07:26:10 GMT  
 Editing text file in c

Quote:

>Where i can find some functions to editing text file ... such as deleting
>rows containing certain words or replacing strings ...

vim

Quote:

>Special thanks from Italy
>Emanuele Frontoni

--
Hemang Ajmera
4th year DD Student
Aerospace Department
IIT Bombay.
India.


Sun, 08 Aug 2004 02:22:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Wanted: locating positions in edited text files

2. Need help with editing text files then writing the new, altered format to a single Output file.

3. Which is the Best Way To Edit a Text File

4. Editing a text file

5. Editing a text file

6. Text Editing Resources (.rc files)

7. Problem editing big text files

8. Show text file in edit box ?

9. Text to Rich Edit conversion on read from file

10. rich edit not able to load text from file

11. What is easiest way to read text file into mem and push into edit control

12. Putting text into an Edit box from a file

 

 
Powered by phpBB® Forum Software