1 #ifndef __libquark_util_Lists_hxx 2 #define __libquark_util_Lists_hxx 18 const QList<T> &prefix)
20 int prefixLength = prefix.length();
21 if(prefixLength < list.length())
24 for(
int i = 0; i < prefixLength; ++i)
26 if(list.at(i) != prefix.at(i))
35 const QList<T> &suffix)
37 int suffixLength = suffix.length();
38 int listLength = list.length();
39 if(suffixLength < listLength)
42 int offset = listLength - suffixLength;
43 for(
int i = 0; i < suffixLength; ++i)
45 if(list.at(i + offset) != suffix.at(i))
56 Q_DISABLE_COPY(
Lists);
62 #endif // __libquark_util_Algorithms_hxx static bool listHasSuffix(const QList< T > &list, const QList< T > &suffix)
Definition: Lists.h++:34
Definition: BarChartView.h++:6
static bool listHasPrefix(const QList< T > &list, const QList< T > &prefix)
Definition: Lists.h++:17
A collection of list operations.
Definition: Lists.h++:12