ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/XmlTools2/trunk/util.h
(Generate patch)

Comparing XmlTools2/trunk/util.h (file contents):
Revision 920 by s10k, Sun Feb 2 18:50:10 2014 UTC vs.
Revision 926 by s10k, Wed Feb 5 18:31:05 2014 UTC

# Line 5 | Line 5
5   #include <QDir>
6   #include <QString>
7   #include <QStringList>
8 + #include <QRegExp>
9   #include <iostream> // cout, cin etc.
10  
11   namespace GlobalVars{
# Line 49 | Line 50 | inline QString toQString(std::string myS
50      return QString::fromStdString(myString);
51   }
52  
53 + inline QStringList QStringToArgsArray(const QString &args){
54 +    QStringList result;
55 +    result=Util::substring(args," ");
56 +
57 +    for(int i=0; i<result.size(); i++){
58 +        result[i].remove('"'); // remove quotes, they are not necessary as we had already splited the spaces
59 +    }
60 +
61 +    return result;
62 + }
63 +
64   }
65  
66   #endif // UTIL_H

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)