Hello everyone, i'm trying to develop an program that validate a string that will have just numbers, but to do this i need to make the string become an int number array, i'm using a mask that just allows the user to insert numbers, and i replaced all special characters like "." , "-" that i used in the mask and my string now is just numbers.
Like the code:
ui->lineEdit->setInputMask("000.000.000-00");
QString cpf
= ui
->lineEdit
->text
();
cpf.replace(".","");
cpf.replace("-","");
ui->lineEdit->setInputMask("000.000.000-00");
QString cpf = ui->lineEdit->text();
cpf.replace(".","");
cpf.replace("-","");
To copy to clipboard, switch view to plain text mode
Please help me make my string become an int array, because i need to work with each number at a time to compare them and validate the whole number!
Thank you very much!
Bookmarks