How can I check to see if a String contains a whitespace character, an empty space or \" \". If possible, please provide a Java example.
For example: String
Use org.apache.commons.lang.StringUtils.
boolean withWhiteSpace = StringUtils.contains("my name", " ");
StringUtils.deleteWhitespace(null) = null StringUtils.deleteWhitespace("") = "" StringUtils.deleteWhitespace("abc") = "abc" StringUtils.deleteWhitespace(" ab c ") = "abc"