I want to find \n
in Edit Text then do something;
I don't want to give user error when he use enter in edit text
For example in my app nobody allows to write this sentence
sentence: "Hello \n world"
I used this code, it worked for characters but didn't work for \n
code:
private boolean findn(String t){
for (int i=0;i<t.length();i++){
if (t.charAt(i)=='\n'){
return true;
}
}
return false;
}