How would I remove the the first two characters of a QString or if I have to put it a StackOverflows layman's terms:
QString str = "##Name" //output: ##Name
to
output: Name
So far I have used this small piece of code:
if(str.contains("##"))
{
str.replace("##","");
}
..but it doesn't work as I would need to have "##" in some other strings, but not at the beginning.
The first two characters may occur to be "%$" and "#@" as well and that mostly the reason why I need to delete the first two characters.
Any ideas?
This the syntax to remove the two first characters.
str.remove(0, 2);