Index: Include/Classes/System/String.ab
===================================================================
--- Include/Classes/System/String.ab	(revision 193)
+++ Include/Classes/System/String.ab	(revision 203)
@@ -16,4 +16,6 @@
 
 Class String
+'	Inherits IComparable, ICloneable, IConvertible, IEnumerable
+
 	m_Length As Long
 Public
@@ -21,5 +23,5 @@
 
 	Sub String()
-		Chars = _System_malloc(SizeOf (StrChar)) '0
+		Chars = _System_malloc(SizeOf (StrChar))
 		Chars[0] = 0
 		m_Length = 0
@@ -129,5 +131,5 @@
 	End Function
 
-	Const Function Operator + (ByRef objString As String) As String
+	Const Function Operator + (objString As String) As String
 		Return Concat(objString.Chars, objString.m_Length)
 	End Function
@@ -143,11 +145,11 @@
 	End Function
 
-	Const Function Operator & (ByRef objString As String) As String
+	Const Function Operator & (objString As String) As String
 		Dim tempString = This + objString
 		Return tempString
 	End Function
 
-	Const Function Operator == (ByRef objString As String) As Boolean
-		Return _System_StrCmp(This.Chars, objString.Chars) = 0
+	Const Function Operator == (objString As String) As Boolean
+		Return String.Compare(This, objString) = 0
 	End Function
 
@@ -156,6 +158,6 @@
 	End Function
 
-	Const Function Operator <> (ByRef objString As String) As Boolean
-		Return _System_StrCmp(This.Chars, objString.Chars) <> 0
+	Const Function Operator <> (objString As String) As Boolean
+		Return String.Compare(This, objString) <> 0
 	End Function
 
@@ -164,6 +166,6 @@
 	End Function
 
-	Const Function Operator < (ByRef objString As String) As Boolean
-		Return _System_StrCmp(This.Chars, objString.Chars) < 0
+	Const Function Operator < (objString As String) As Boolean
+		Return String.Compare(This, objString) < 0
 	End Function
 
@@ -172,6 +174,6 @@
 	End Function
 
-	Const Function Operator > (ByRef objString As String) As Boolean
-		Return _System_StrCmp(This.Chars, objString.Chars) > 0
+	Const Function Operator > (objString As String) As Boolean
+		Return String.Compare(This, objString) > 0
 	End Function
 
@@ -180,6 +182,6 @@
 	End Function
 
-	Const Function Operator <= (ByRef objString As String) As Boolean
-		Return _System_StrCmp(This.Chars, objString.Chars) <= 0
+	Const Function Operator <= (objString As String) As Boolean
+		Return String.Compare(This, objString) <= 0
 	End Function
 
@@ -188,10 +190,47 @@
 	End Function
 
-	Const Function Operator >= (ByRef objString As String) As Boolean
-		Return _System_StrCmp(This.Chars, objString.Chars) >= 0
+	Const Function Operator >= (objString As String) As Boolean
+		Return String.Compare(This, objString) >= 0
 	End Function
 
 	Const Function Operator >= (text As *StrChar) As Boolean
 		Return _System_StrCmp(This.Chars, text) >= 0
+	End Function
+
+	Static Function Compare(x As String, y As String) As Long
+		Return CompareOrdinal(x, y)
+	End Function
+
+	Static Function Compare(x As String, indexX As Long, y As String, indexY As Long, length As Long) As Long
+		Return CompareOrdinal(x, indexX, y, indexY, length)
+	End Function
+
+	Static Function CompareOrdinal(x As String, y As String) As Long
+		Return _System_StrCmp(x.Chars, y.Chars)
+	End Function
+
+	Static Function CompareOrdinal(x As String, indexX As Long, y As String, indexY As Long, length As Long) As Long
+		If x = Nothing Then
+			If y = Nothing Then
+				Return 0
+			Else
+				Return -1
+			End If
+		ElseIf y = Nothing Then
+			Return 1
+		End If
+		Return _System_StrCmpN(VarPtr(x.Chars[indexX]), VarPtr(y.Chars[indexY]), length)
+	End Function
+
+	Function CompareTo(y As String) As Long
+		Return String.Compare(This, y)
+	End Function
+
+	Function CompareTo(y As Object) As Long
+		Dim s = y As String
+'		If y is not String Then
+'			Throw New ArgumentException
+'		End If
+		Return CompareTo(y)
 	End Function
 
@@ -341,5 +380,18 @@
 #endif
 	End Function
-	Const Function Contains(ByRef objString As String) As Boolean
+
+	Static Function Concat(x As String, y As String) As String
+		If x = Nothing Then
+			Return y
+		Else
+			Return x.Concat(objString.Chars, objString.m_Length)
+		End If
+	End Function
+
+	Static Function Concat(x As Object, y As Object) As String
+		Return String.Concat(x.ToString, y.ToString)
+	End Function
+
+	Const Function Contains(objString As String) As Boolean
 		Return IndexOf(objString, 0, m_Length) >= 0
 	End Function
