Results 1 to 4 of 4

Thread: Remove First X and last X chharacters from a Qstring.?

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Remove First X and last X chharacters from a Qstring.?

    How can I do this ?
    I've searched a lot about .remove and .replace but I found nothing satisfying!
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  2. #2
    Join Date
    Feb 2010
    Posts
    18
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Remove First X and last X chharacters from a Qstring.?

    See documentation of the functions right, left and chop. There you'll find examples.

  3. The following user says thank you to majorwoody for this useful post:

    hakermania (21st January 2011)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Remove First X and last X chharacters from a Qstring.?

    QString::mid() is exactly what you need.

  5. #4
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Remove First X and last X chharacters from a Qstring.?

    Thank you found it!
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

Similar Threads

  1. Replies: 8
    Last Post: 25th November 2010, 11:40
  2. With QString create a QString&
    By avis_phoenix in forum Newbie
    Replies: 1
    Last Post: 21st April 2010, 22:05
  3. Replies: 4
    Last Post: 1st February 2010, 14:21
  4. Replies: 4
    Last Post: 31st January 2008, 20:44
  5. how to copy part of QString to anothe QString
    By nass in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2007, 19:05

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.