Character.st
branchjv
changeset 25446 98fb817db6de
parent 25420 a18d0d048b1f
--- a/Character.st	Wed Mar 22 13:57:18 2023 +0000
+++ b/Character.st	Sat Oct 29 01:05:05 2022 +0100
@@ -2,6 +2,7 @@
 
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
+ COPYRIGHT (c) 2022 LabWare
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -27,6 +28,7 @@
 copyright
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
+ COPYRIGHT (c) 2022 LabWare
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -323,6 +325,9 @@
     ^ self codePoint:anInteger
 ! !
 
+
+
+
 !Character class methodsFor:'accessing untypeable characters'!
 
 controlCharacter:char
@@ -381,6 +386,7 @@
     ^ self codePoint:41
 ! !
 
+
 !Character class methodsFor:'constants'!
 
 backspace
@@ -660,6 +666,7 @@
     "
 ! !
 
+
 !Character methodsFor:'Compatibility-Dolphin'!
 
 isAlphaNumeric
@@ -724,6 +731,7 @@
       or:[ (asciivalue == 247 ) ]]]]]
 ! !
 
+
 !Character methodsFor:'accessing'!
 
 codePoint
@@ -789,6 +797,7 @@
     ^ Character codePoint:(asciivalue \\ aMagnitude asInteger \\ 16r3FFFFFFF)
 ! !
 
+
 !Character methodsFor:'comparing'!
 
 < aMagnitude
@@ -1785,6 +1794,7 @@
     "
 ! !
 
+
 !Character methodsFor:'obsolete'!
 
 asciiValue
@@ -2766,6 +2776,28 @@
     ^ false
 ! !
 
+!Character methodsFor:'testing - math'!
+
+isMathBinaryOperator
+    "Mathematical Operators
+     https://unicode.org/charts/PDF/U2200.pdf"
+    (asciivalue between: 16r2200 and: 16r22FF) ifTrue: [ ^ true ].
+
+    "Mathematical Arrows
+     https://unicode.org/charts/PDF/U2190.pdf"
+    (asciivalue between: 16r2190 and: 16r21FF) ifTrue: [ ^ true ].
+
+    ^ false
+
+    "Created: / 29-10-2022 / 00:01:18 / Jan Vrany <jan.vrany@labware.com>"
+!
+
+isMathLetter
+    ^ self isGreekLetter
+
+    "Created: / 28-10-2022 / 23:56:56 / Jan Vrany <jan.vrany@labware.com>"
+! !
+
 !Character methodsFor:'testing - national'!
 
 asNonDiacritical
@@ -3428,5 +3460,10 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !