Мне нужно проверить мой код, содержит ли текст какие-либо пробелы.
Мой код:
Код: Выделить всё
if (text.contains(" ") || text.contains("\t") || text.contains("\r")
|| text.contains("\n"))
{
//code goes here
}
Код: Выделить всё
\t ,\rКод: Выделить всё
if (text.contains(" ") || text.contains("\t") || text.contains("\r")
|| text.contains("\n"))
{
//code goes here
}
Код: Выделить всё
\t ,\r