Results 1 to 11 of 11

Thread: QByteArray.split() returning QList with empty first element

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QByteArray.split() returning QList with empty first element

    In other words "&" separates items. Therefore by definition the number of items in the array equals to number of separators + 1. Since you have one occurence of the separator, you have two items (no separators would yield one item -- the whole input string).
    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.


  2. The following user says thank you to wysota for this useful post:

    FreddyKay (4th February 2015)

Similar Threads

  1. Replies: 9
    Last Post: 23rd April 2012, 13:53
  2. QByteArray split out data
    By jeffmetal in forum Qt Programming
    Replies: 9
    Last Post: 28th May 2011, 07:24
  3. QByteArray split to a list
    By ruben.rodrigues in forum Qt Programming
    Replies: 2
    Last Post: 1st November 2010, 10:49
  4. split QByteArray
    By xproch13 in forum Newbie
    Replies: 2
    Last Post: 29th October 2010, 21:50
  5. Replies: 4
    Last Post: 20th August 2010, 13:54

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.