Lines Matching refs:chr
246 * @param chr the {@code char} to check
251 public static boolean isHtmlSpace(char chr) {
252 return HTML_WHITESPACE.contains(chr);
274 * @param chr the {@code char} to check
278 public static boolean isJavascriptWhitespace(char chr) {
279 return JAVASCRIPT_WHITESPACE.contains(chr);
298 * @param chr {@code char} to check
299 * @return {@code true} if the {@code chr} is a Javascript whitespace
302 public static boolean isJavascriptIdentifier(char chr) {
303 return ((chr >= 'a' && chr <= 'z')
304 || (chr >= 'A' && chr <= 'Z')
305 || (chr >= '0' && chr <= '9')
306 || chr == '_' || chr == '$');
330 * @param chr {@code char} to encode
333 public static String encodeCharForAscii(char chr) {
334 if (chr == '\'') {
336 } else if (chr == '\\') {
338 } else if (chr >= 32 && chr <= 126) {
339 return String.format("%c", chr);
340 } else if (chr == '\n') {
342 } else if (chr == '\r') {
344 } else if (chr == '\t') {
349 return String.format("\\u%04x", (int)chr);