1 /****************************************************************************
3 ** Copyright (C) 1997-2018 by Dimitri van Heesch.
5 ** Permission to use, copy, modify, and distribute this software and its
6 ** documentation under the terms of the GNU General Public License is hereby
7 ** granted. No representations are made about the suitability of this software
8 ** for any purpose. It is provided "as is" without express or implied warranty.
9 ** See the GNU General Public License for more details.
11 ** Note: this is a variant of the qstringlist.h but for QCString's
13 **********************************************************************/
14 #ifndef QCSTRINGLIST_H
15 #define QCSTRINGLIST_H
17 #include "qvaluelist.h"
24 class QCStringList : public QValueList<QCString>
28 QCStringList( const QCStringList& l ) : QValueList<QCString>(l) { }
29 QCStringList( const QValueList<QCString>& l ) : QValueList<QCString>(l) { }
30 QCStringList( const QCString& i ) { append(i); }
31 QCStringList( const char* i ) { append(i); }
33 static QCStringList fromStrList(const QStrList&);
35 static QCStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE );
36 static QCStringList split( char sep, const QCString &str, bool allowEmptyEntries = FALSE );
37 static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE );
38 QCString join( const QCString &sep ) const;
40 QCStringList grep( const QCString &str, bool cs = TRUE ) const;
41 QCStringList grep( const QRegExp &expr ) const;
44 extern Q_EXPORT QDataStream &operator>>( QDataStream &, QCStringList& );
45 extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QCStringList& );
47 #endif // QCSTRINGLIST_H