Results 1 to 2 of 2

Thread: QString looking method "find"

  1. #1
    Join Date
    Nov 2009
    Location
    Poland, Silesia
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QString looking method "find"

    Hi,

    I want search all index of substrings on my core string, but I don't see any method for search substring, for exemple:
    string core= "abcaaannhhdd"
    string key ="an"
    int index = core.find(key)


    How I can do it with QString ?


    currently Im thinking about use QString::mid , but split string and compare with "key" ... for many large strings is not optimal. Is this only way ?
    Last edited by Skowroniasty; 14th November 2009 at 18:03.

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

    Default Re: QString looking method "find"

    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. The following user says thank you to wysota for this useful post:

    Skowroniasty (14th November 2009)

Similar Threads

  1. Qy 4.4.3 MySQL driver failed
    By pamalite in forum Installation and Deployment
    Replies: 2
    Last Post: 23rd January 2010, 01:09
  2. File rename detection
    By bunjee in forum Qt Programming
    Replies: 6
    Last Post: 23rd July 2009, 15:22
  3. Custom Model Advice Requested
    By mclark in forum Qt Programming
    Replies: 3
    Last Post: 18th September 2008, 16:26
  4. Need SpanIncluding like method in QString
    By rajeshs in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 14:05
  5. Convert from iso-8859-1 to... Something else :-)
    By Nyphel in forum Qt Programming
    Replies: 4
    Last Post: 7th March 2007, 17:59

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
  •  
Qt is a trademark of The Qt Company.