Skip to content

Commit 803739f

Browse files
committed
Making example code compile with Eclipse setup.
1 parent 8744fd5 commit 803739f

3 files changed

Lines changed: 19 additions & 14 deletions

File tree

lib/commons-lang-2.4.jar

256 KB
Binary file not shown.

snippets/StringUtils.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1+
2+
import static org.apache.commons.lang.StringUtils.*;
3+
import org.apache.commons.lang.ArrayUtils;
4+
15
// From Apache Commons Lang, http://commons.apache.org/lang/
6+
public class StringUtils {
7+
public static boolean isBlank(String str) {
8+
int strLen;
9+
if (str == null || (strLen = str.length()) == 0) {
10+
return true;
11+
}
12+
for (int i = 0; i < strLen; i++) {
13+
if ((Character.isWhitespace(str.charAt(i)) == false)) {
14+
return false;
15+
}
16+
}
17+
return true;
18+
}
19+
220
public static int indexOfAny(String str, char[] searchChars) {
321
if (isEmpty(str) || ArrayUtils.isEmpty(searchChars)) {
422
return -1;
@@ -13,3 +31,4 @@ public static int indexOfAny(String str, char[] searchChars) {
1331
}
1432
return -1;
1533
}
34+
}

snippets/isBlank.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)