Character.st
changeset 3667 83b1cebac287
parent 3190 81ffb25d1d86
child 3881 e8fd1f890897
--- a/Character.st	Tue Jul 21 16:34:29 1998 +0200
+++ b/Character.st	Tue Jul 21 17:27:23 1998 +0200
@@ -856,6 +856,29 @@
     ^ true
 !
 
+isControlCharacter
+    "return true if I am a control character (i.e. ascii value < 32)"
+
+%{  /* NOCONTEXT */
+#ifdef NON_ASCII       /* i.e. EBCDIC ;-) */
+    not yet implemented - fails when compiled
+#else
+    REGISTER int val;
+
+    val = __intVal(__INST(asciivalue));
+    if (val <= ' ') {
+        RETURN ( true );
+    }
+#endif
+%}.
+    ^ false
+
+    "
+     (Character value:1) isControlCharacter
+     $a isControlCharacter
+    "
+!
+
 isDigit
     "return true, if I am a digit (i.e. $0 .. $9)"
 
@@ -1026,5 +1049,5 @@
 !Character class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.48 1998-01-20 18:09:51 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.49 1998-07-21 15:27:23 cg Exp $'
 ! !