From 396c0822cd6a614f1906fccd05dee2fecafffaa9 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 17 Oct 2013 15:04:22 -0500 Subject: [PATCH] Add java.lang.Character#isISOControl(char) ... as per the public JavaDoc at http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isISOControl%28char%29 Signed-off-by: Johannes Schindelin --- classpath/java/lang/Character.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classpath/java/lang/Character.java b/classpath/java/lang/Character.java index a69140562f..8d49043fd4 100644 --- a/classpath/java/lang/Character.java +++ b/classpath/java/lang/Character.java @@ -170,6 +170,10 @@ public final class Character implements Comparable { return ch >= '\uDC00' && ch <= '\uDFFF'; } + public static boolean isISOControl(char ch) { + return ch <= '\u001F' || (ch >= '\u007F' && ch <= '\u009F'); + } + public static int toCodePoint(char high, char low) { return (((high & 0x3FF) << 10) | (low & 0x3FF)) + 0x10000; }