edittext.getText().toString()
get edittext ( multi-line ) text . Now want to know where a character is not the Enter key,
I use \ r \ n can not match , will be how to achieve ? Is not required to match with the ascii value ? Thank you !
------ Solution ---------------------------------------- ----
should be \ n it
------ Solution ---------------------------- ----------------
newline and carriage return has a corresponding value in the Ascii code , 10 and 13 , respectively , declare two char variables, taking out value comparison .
------ eference --------------------------------------- < br>
No, with
if (input_current == "\n"){}
not return true
没有评论:
发表评论