Check text from file

2

I have a text file with the following content:

Name: Number: Password:

What I want is to read this file and check if after the: has some character.Another question on the same subject: How can I check if the text of a file has the character:?

    
asked by anonymous 28.11.2015 / 16:42

1 answer

0

To verify that the file contains the ':' character

String textoDoArquivo = FileUtils.readFileToString(seuArquivo);
if(textoDoArquivo.contains(':'){
     //O caractere está presente no arquivo
}
    
01.12.2015 / 01:57