How can I check if the last character of value is any letter without comparing it manually with each letter?
if(value.endsWith("A",Qt::CaseInsensitive)==true)
...
This is my code so far, Value has to start with Y/X/Z and have 9 characters
void Extranjero::setNIE(const QString &value)
{
if(value.startsWith("Y",Qt::CaseInsensitive)==true && value.length()==9)
{
NIE = value;
}
else if(value.startsWith("X",Qt::CaseInsensitive)==true && value.length()==9)
{
NIE = value;
}
else if(value.startsWith("Z",Qt::CaseInsensitive)==true && value.length()==9)
{
NIE = value;
}
else NIE = "Problemon";
}