#include <mstring.h>
Public Member Functions | |
| MStringList () | |
| MStringList (const std::list< MString > &msl) | |
| MStringList (const_iterator start, const_iterator end) | |
| ~MStringList () | |
| MStringList | operator+ (const MStringList &msl) const |
| MStringList & | operator+= (const MStringList &msl) |
| const MString & | operator[] (int pos) const |
| MStringList & | operator<< (const char *str) |
| MString | join (const char *sep) const |
| bool | contains (const char *str, bool ignoreCase=false) const |
| MStringList | intersect (const MStringList &msl, bool ignoreCase=false) const |
| MStringList | minus (const MStringList &msl, bool ignoreCase=false) const |
| mstring::MStringList::MStringList | ( | ) |
Constructs an empty MStringList.
| mstring::MStringList::MStringList | ( | const std::list< MString > & | msl | ) |
Constructs a copy of an existing MString list.
| mstring::MStringList::MStringList | ( | const_iterator | start, | |
| const_iterator | end | |||
| ) |
Constructs a MStringList with the part of another MStringList the iterators point to.
| mstring::MStringList::~MStringList | ( | ) |
| MStringList mstring::MStringList::operator+ | ( | const MStringList & | msl | ) | const |
Concatenates a MStringList to this one and returns the result as a new MStringList.
| MStringList& mstring::MStringList::operator+= | ( | const MStringList & | msl | ) |
Appends another MStringList to this one.
| const MString& mstring::MStringList::operator[] | ( | int | pos | ) | const |
Accessor for a single item in the list at the given position. Iterates over the list from the first or last item and returns a const reference to the item at position pos in the list (begin of list: pos == 0), or the last item if pos points to a position behind the last item, or the first item if pos points to a position before the first item. The result is undefined if the list is empty.
If pos is negative then items are counted backwards from the end of the contained string; -1 is the last item etc.
| MStringList& mstring::MStringList::operator<< | ( | const char * | str | ) |
Inserter for appending strings to the list. This works like std::list::push_back().
| MString mstring::MStringList::join | ( | const char * | sep | ) | const |
Joins all strings in the list into one, separating them with sep.
| bool mstring::MStringList::contains | ( | const char * | str, | |
| bool | ignoreCase = false | |||
| ) | const |
Checks if the given string is part of the list.
| MStringList mstring::MStringList::intersect | ( | const MStringList & | msl, | |
| bool | ignoreCase = false | |||
| ) | const |
Returns a list of all items common to this and another MStringList.
| MStringList mstring::MStringList::minus | ( | const MStringList & | msl, | |
| bool | ignoreCase = false | |||
| ) | const |
Returns a list of all items that are in this MStringList, but not in the other one; the result is a copy of this list without the items common to both lists.
1.5.2