Hey QT friends,
I have a simple but nerve-racking problem:
I have a QString like this "Hello World. I am Marcus. I have a problem. QString split erases my separator. That is bad."
I want to get a QStringList with the following strings:
"Hello World."
"I am Marcus."
"I have a problem."
...
So I use the function:
|
Source code
|
1
|
QStringList SubStringList = verticesString.split(".",QString::KeepEmptyParts);
|
and I get a QStringList with these strings:
"Hello World"
"I am Marcus"
"I have a problem"
So the function QString.split erases the separator "."
I want to avoid that but I do not know, how! I want a function that splits my String into a StringList but keeps the separator in the strings.
How do I do that? Thank you for your help!
Best,
Marcus