I'm developing a Qt application. I have some Strings like :
(Sub String before @)
[email protected]
[email protected]
I want to use
43243263
325754754
How to do that?
You can use QString::indexOf and QString::mid methods to extract the desired part.
QString str = "[email protected]";
QString desired = str.mid(0, str.indexOf("@"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With