2
I have a text file with the following content:
Name: Number: Password:
What I want to do is read this file and check if after : it has some character. Another question on the same subject: How can I check if the text of a file has the character :?
2
I have a text file with the following content:
Name: Number: Password:
What I want to do is read this file and check if after : it has some character. Another question on the same subject: How can I check if the text of a file has the character :?
1
To check whether the file contains the character ':'
String textoDoArquivo = FileUtils.readFileToString(seuArquivo);
if(textoDoArquivo.contains(':'){
//O caractere está presente no arquivo
}
Browser other questions tagged java android
You are not signed in. Login or sign up in order to post.
texto.contains(":")?– Renan Gomes
Regular expression serves perfectly for this
– R.Santos