Did you look at the QString documentation? There are plenty of String-modifying and extracting functions.

QString::split() - this returns a QStringList which you can later query.

or QString::section()

Just have a look there...