Fix tabs to spaces, thank you Jörg.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2010-03-15 18:47:37 +00:00
parent 022d08cfd3
commit 6505531d5c
1 changed files with 26 additions and 26 deletions

View File

@ -1437,32 +1437,32 @@ public class StringUtils {
* <code>false</code> if no match or null input * <code>false</code> if no match or null input
* @since 2.4 * @since 2.4
*/ */
public static boolean containsAny(CharSequence cs, char[] searchChars) { public static boolean containsAny(CharSequence cs, char[] searchChars) {
if (isEmpty(cs) || ArrayUtils.isEmpty(searchChars)) { if (isEmpty(cs) || ArrayUtils.isEmpty(searchChars)) {
return false; return false;
} }
int csLength = cs.length(); int csLength = cs.length();
int searchLength = searchChars.length; int searchLength = searchChars.length;
int csLastIndex = csLength - 1; int csLastIndex = csLength - 1;
int searchLastIndex = searchLength - 1; int searchLastIndex = searchLength - 1;
for (int i = 0; i < csLength; i++) { for (int i = 0; i < csLength; i++) {
char ch = cs.charAt(i); char ch = cs.charAt(i);
for (int j = 0; j < searchLength; j++) { for (int j = 0; j < searchLength; j++) {
if (searchChars[j] == ch) { if (searchChars[j] == ch) {
if (i < csLastIndex && j < searchLastIndex && ch >= Character.MIN_HIGH_SURROGATE && ch <= Character.MAX_HIGH_SURROGATE) { if (i < csLastIndex && j < searchLastIndex && ch >= Character.MIN_HIGH_SURROGATE && ch <= Character.MAX_HIGH_SURROGATE) {
// ch is a supplementary character // ch is a supplementary character
if (searchChars[j + 1] == cs.charAt(i + 1)) { if (searchChars[j + 1] == cs.charAt(i + 1)) {
return true; return true;
} }
} else { } else {
// ch is in the Basic Multilingual Plane // ch is in the Basic Multilingual Plane
return true; return true;
} }
} }
} }
} }
return false; return false;
} }
/** /**
* <p> * <p>