Re: [Interest] Parsing key/value pairs from a string.

2013-02-05 Thread Jason Cipriani
c Qt property-holding object that could parse strings in this format, still amateur with Qt and trying not to reinvent wheels. Thanks again guys, Jason > -- > *From:* d3fault > *To:* Qt Interest > *Sent:* Monday, February 4, 2013 10:07 PM > *Subje

Re: [Interest] Parsing key/value pairs from a string.

2013-02-05 Thread Jason H
is there a concern about percent encoded characters? %20, %7f, etc. I think QURL would handle that better. From: d3fault To: Qt Interest Sent: Monday, February 4, 2013 10:07 PM Subject: Re: [Interest] Parsing key/value pairs from a string. While what

Re: [Interest] Parsing key/value pairs from a string.

2013-02-04 Thread d3fault
While what you're asking is easily accomplishing using QString::split() [0] , you could convince QUrl [1] (or QUrlQuery [2] if using Qt 5) to do it for you if you make the string a valid URL first: "http://blah.com/?your=query&goes=here"; and then ignore the hostname/protocol functionality of QUrl.

[Interest] Parsing key/value pairs from a string.

2013-02-04 Thread Jason Cipriani
I have a QString, properties, formatted something like: keyvalue = key value properties = keyvalue *( keyvalue ) E.g.: "color:red;material:wood;name:joe" or "color=red&material=wood&name=joe" where and are arbitrary but known ahead of time. I'm loading the key/value pairs into a QMap. E