Questions tagged «string-utils»

11
StringUtils.isBlank()与String.isEmpty()
我遇到了一些包含以下内容的代码: String foo = getvalue("foo"); if (StringUtils.isBlank(foo)) doStuff(); else doOtherStuff(); 这在功能上似乎等同于以下内容: String foo = getvalue("foo"); if (foo.isEmpty()) doStuff(); else doOtherStuff(); 两者(org.apache.commons.lang3.StringUtils.isBlank和java.lang.String.isEmpty)有区别吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.