1 // Copyright 2009 The Archiveopteryx Developers <info@aox.org>
2 
3 #ifndef USTRINGLIST_H
4 #define USTRINGLIST_H
5 
6 #include "list.h"
7 #include "ustring.h"
8 
9 
10 class UStringList
11     : public List< UString >
12 {
13 public:
14     UStringList();
15 
append(UString * s)16     void append( UString * s ) { List<UString>::append( s ); }
17     void append( const UString & );
append(const UStringList & other)18     void append( const UStringList & other ) {
19         Iterator o( other );
20         while ( o ) {
21             append( o );
22             ++o;
23         }
24     }
25 
26     void removeDuplicates( bool = true );
27     bool contains( const UString & ) const;
28 
29     UString join( const UString & );
30     UString join( const char * );
31     static UStringList *split( char, const UString & );
32 
33     UStringList &operator =( const UStringList & other ) {
34         clear();
35         append( other );
36         return *this;
37     }
38 };
39 
40 
41 #endif
42