qt5base-lts/tests/auto/corelib/tools/qstring
Giuseppe D'Angelo 9110d4f1ed QString::contains overload that returns the match results
This convenience overload allows one to write

    QRegularExpression re1, re2, ...;
    QRegularExpressionMatch match;
    QString subject;

    if (subject.contains(re1, &match)) {
        // ...
    } else if (subject.contains(re2, &match)) {
        // ...
    } // ..

One can then inspect the results of a successful match in each block
(as well as extracting the captured substrings, etc.).

Change-Id: I0fb8be8b577656e8db994198f8105c26c4fe67b0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-14 10:26:59 +01:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
double_data.h Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qstring.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qstring.cpp QString::contains overload that returns the match results 2013-01-14 10:26:59 +01:00