From b908ebe6c3368a98a433e786a48c78147f199382 Mon Sep 17 00:00:00 2001 From: adash Date: Mon, 13 Apr 2009 18:13:19 +0000 Subject: [PATCH] Detect if character is a whitespace --- Robust/src/ClassLibrary/Character.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Robust/src/ClassLibrary/Character.java b/Robust/src/ClassLibrary/Character.java index 2a12c8c1..521a174e 100644 --- a/Robust/src/ClassLibrary/Character.java +++ b/Robust/src/ClassLibrary/Character.java @@ -28,4 +28,22 @@ public class Character { public String toString() { return ""+value; } + + public static boolean isWhitespace(char character) { + boolean returnValue; + if ( (character == '\t') || + (character == '\n') || + (character == ' ') || + (character == '\u000C') || + (character == '\u001C') || + (character == '\u001D') || + (character == '\u001E') || + (character == '\u001F')) + { + returnValue = true; + } else { + returnValue = false; + } + return returnValue; + } } -- 2.34.1