com.fasterxml.aalto.util.TextUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aalto-xml Show documentation
Show all versions of aalto-xml Show documentation
Ultra-high performance non-blocking XML processor (Stax/Stax2, SAX/SAX2)
package com.fasterxml.aalto.util;
public final class TextUtil
{
final static int CHAR_SPACE = 0x0020;
private TextUtil() { }
public static boolean isAllWhitespace(String str, boolean xml11)
{
for (int i = 0, len = str.length(); i < len; ++i) {
int c = (int) str.charAt(i);
if (c > CHAR_SPACE && (!xml11 || c != 0x85)) {
return false;
}
}
return true;
}
public static boolean isAllWhitespace(char[] ch, int start, int len, boolean xml11)
{
len += start;
for (; start < len; ++start) {
int c = (int) ch[start];
if (c > CHAR_SPACE && (!xml11 || c != 0x85)) {
return false;
}
}
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy