Results 1 to 3 of 3

Thread: Delete character from file

  1. #1
    Join Date
    Oct 2009
    Location
    Poland
    Posts
    34
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Delete character from file

    Hello,
    is there any nice way to do it ?

    Best Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Delete character from file

    If you mean to delete a character from the middle of a file then no - you have to rewrite each character after the character you wish to remove.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2009
    Posts
    151
    Thanks
    6
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Delete character from file

    You could do something similar to the Unix tr command, basically read in the file and save it back out, skipping the required character.

Similar Threads

  1. Replies: 2
    Last Post: 10th November 2009, 06:17
  2. Character by Character (Unicode?) File Reading
    By mclark in forum Qt Programming
    Replies: 4
    Last Post: 22nd April 2009, 15:28
  3. How to read QStringList character by character
    By iamjayanth in forum Qt Programming
    Replies: 4
    Last Post: 3rd April 2009, 11:25
  4. how to delete a file?
    By whoops.slo in forum Qt Programming
    Replies: 4
    Last Post: 22nd November 2006, 14:27
  5. How to delete File
    By rajesh in forum Qt Programming
    Replies: 1
    Last Post: 7th November 2006, 11:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.