| 10 | #include <QStringList> |
| 11 | |
| 12 | static int commonPrefix(const QString &text1, const QString &text2) |
| 13 | { |
| 14 | int i = 0; |
| 15 | const int text1Count = text1.size(); |
| 16 | const int text2Count = text2.size(); |
| 17 | const int maxCount = qMin(text1Count, text2Count); |
| 18 | while (i < maxCount) { |
| 19 | if (text1.at(i) != text2.at(i)) |
| 20 | break; |
| 21 | i++; |
| 22 | } |
| 23 | return i; |
| 24 | } |
| 25 | |
| 26 | static int commonSuffix(const QString &text1, const QString &text2) |
| 27 | { |
no test coverage detected