Index: trunk/Include/Classes/System/String.ab
===================================================================
--- trunk/Include/Classes/System/String.ab	(revision 457)
+++ trunk/Include/Classes/System/String.ab	(revision 468)
@@ -5,30 +5,19 @@
 #require <Classes/ActiveBasic/Strings/Strings.ab>
 
-#ifdef __STRING_IS_NOT_ALWAYS_UNICODE
-
-#ifndef UNICODE
 TypeDef StrChar = Char
-#define __STRING_IS_NOT_UNICODE
-#endif
-
-#endif
-
-#ifndef __STRING_IS_NOT_UNICODE
-TypeDef StrChar = WCHAR
 
 #ifdef UNICODE
 #define __STRING_IS_UNICODE
 #else
-#define __STRING_UNICODE_WINDOWS_ANSI
+#define __STRING_IS_NOT_UNICODE
 #endif
-#endif
 
 Namespace System
 
 	Class String
-		Implements /*IComparable, ICloneable, IConvertible, IComparable<String>, IEnumerable, IEnumerable<StrChar>, IEquatable<String>*/
+		Implements /*IComparable, ICloneable, IConvertible, IComparable<String>, IEnumerable, IEnumerable<Char>, IEquatable<String>*/
 
 		m_Length As Long
-		Chars As *StrChar
+		Chars As *Char
 
 		Sub validPointerCheck(p As VoidPtr, size = 1 As Long)
@@ -89,5 +78,5 @@
 		End Sub
 
-		Sub String(initChar As StrChar, length As Long)
+		Sub String(initChar As Char, length As Long)
 			AllocStringBuffer(length)
 			ActiveBasic.Strings.ChrFill(Chars, length, initChar)
@@ -105,9 +94,9 @@
 		End Function
 
-		Function Operator() As *StrChar
+		Function Operator() As *Char
 			Return Chars
 		End Function
 
-		Const Function Operator [] (n As Long) As StrChar
+		Const Function Operator [] (n As Long) As Char
 			rangeCheck(n)
 			Return Chars[n]
@@ -154,5 +143,5 @@
 		End Function
 
-		Const Function Operator == (y As *StrChar) As Boolean
+		Const Function Operator == (y As *Char) As Boolean
 			Return Compare(This, y) = 0
 		End Function
@@ -162,5 +151,5 @@
 		End Function
 
-		Const Function Operator <> (y As *StrChar) As Boolean
+		Const Function Operator <> (y As *Char) As Boolean
 			Return Compare(This, y) <> 0
 		End Function
@@ -170,5 +159,5 @@
 		End Function
 
-		Const Function Operator < (y As *StrChar) As Boolean
+		Const Function Operator < (y As *Char) As Boolean
 			Return Compare(This, y) < 0
 		End Function
@@ -178,5 +167,5 @@
 		End Function
 
-		Const Function Operator > (y As *StrChar) As Boolean
+		Const Function Operator > (y As *Char) As Boolean
 			Return Compare(This, y) > 0
 		End Function
@@ -186,5 +175,5 @@
 		End Function
 
-		Const Function Operator <= (y As *StrChar) As Boolean
+		Const Function Operator <= (y As *Char) As Boolean
 			Return Compare(This, y) <= 0
 		End Function
@@ -194,5 +183,5 @@
 		End Function
 
-		Const Function Operator >= (y As *StrChar) As Boolean
+		Const Function Operator >= (y As *Char) As Boolean
 			Return Compare(This, y) >= 0
 		End Function
@@ -217,13 +206,13 @@
 		End Function
 	Private
-		Static Function Compare(x As String, y As *StrChar) As Long
+		Static Function Compare(x As String, y As *Char) As Long
 			Return CompareOrdinal(x, y)
 		End Function
 
-		Static Function CompareOrdinal(x As String, y As *StrChar) As Long
+		Static Function CompareOrdinal(x As String, y As *Char) As Long
 			Return CompareOrdinal(StrPtr(x), y)
 		End Function
 
-		Static Function CompareOrdinal(x As *StrChar, y As *StrChar) As Long
+		Static Function CompareOrdinal(x As *Char, y As *Char) As Long
 			If x = 0 Then
 				If y = 0 Then
@@ -238,5 +227,5 @@
 		End Function
 
-		Static Function CompareOrdinal(x As *StrChar, indexX As Long, y As *StrChar, indexY As Long, length As Long) As Long
+		Static Function CompareOrdinal(x As *Char, indexX As Long, y As *Char, indexY As Long, length As Long) As Long
 			If x = 0 Then
 				If y = 0 Then
@@ -273,5 +262,5 @@
 		End Function
 
-		Const Function StrPtr() As *StrChar
+		Const Function StrPtr() As *Char
 			Return Chars
 		End Function
@@ -280,5 +269,5 @@
 		Sub Assign(text As PCSTR, textLengthA As Long)
 #ifdef __STRING_IS_NOT_UNICODE
-			AssignFromStrChar(text, textLengthA)
+			AssignFromCharPtr(text, textLengthA)
 #else
 			Dim textLengthW = MultiByteToWideChar(CP_THREAD_ACP, 0, text, textLengthA, 0, 0)
@@ -298,12 +287,12 @@
 			End If
 #else
-			AssignFromStrChar(text, textLengthW)
+			AssignFromCharPtr(text, textLengthW)
 #endif
 		End Sub
 
 	Private
-		Static Function ConcatStrChar(text1 As *StrChar, text1Length As Long, text2 As *StrChar, text2Length As Long) As String
-			ConcatStrChar = New String()
-			With ConcatStrChar
+		Static Function ConcatChar(text1 As *Char, text1Length As Long, text2 As *Char, text2Length As Long) As String
+			ConcatChar = New String()
+			With ConcatChar
 				.AllocStringBuffer(text1Length + text2Length)
 				ActiveBasic.Strings.ChrCopy(.Chars, text1, text1Length As SIZE_T)
@@ -315,5 +304,5 @@
 		Const Function Concat(text As PCSTR, len As Long) As String
 #ifdef __STRING_IS_NOT_UNICODE
-			Return ConcatStrChar(This.Chars, m_Length, text, len)
+			Return ConcatChar(This.Chars, m_Length, text, len)
 #else
 			With Concat
@@ -339,5 +328,5 @@
 			End With
 #else
-			Return ConcatStrChar(This.Chars, m_Length, text, len)
+			Return ConcatChar(This.Chars, m_Length, text, len)
 #endif
 		End Function
@@ -375,5 +364,5 @@
 		End Function
 
-		Const Function Contains(c As StrChar) As Boolean
+		Const Function Contains(c As Char) As Boolean
 			Return IndexOf(c) >= 0
 		End Function
@@ -389,19 +378,19 @@
 		End Function
 
-		Const Function IndexOf(c As StrChar) As Long
+		Const Function IndexOf(c As Char) As Long
 			Return indexOfCore(c, 0, m_Length)
 		End Function
 
-		Const Function IndexOf(c As StrChar, start As Long) As Long
+		Const Function IndexOf(c As Char, start As Long) As Long
 			rangeCheck(start)
 			Return indexOfCore(c, start, m_Length - start)
 		End Function
 
-		Const Function IndexOf(c As StrChar, start As Long, count As Long) As Long
+		Const Function IndexOf(c As Char, start As Long, count As Long) As Long
 			rangeCheck(start, count)
 			Return indexOfCore(c, start, count)
 		End Function
 	Private
-		Const Function indexOfCore(c As StrChar, start As Long, count As Long) As Long
+		Const Function indexOfCore(c As Char, start As Long, count As Long) As Long
 			indexOfCore = ActiveBasic.Strings.ChrFind(VarPtr(Chars[start]), count, c) As Long
 			If indexOfCore <> -1 Then
@@ -440,14 +429,14 @@
 		End Function
 
-		Const Function LastIndexOf(c As StrChar) As Long
+		Const Function LastIndexOf(c As Char) As Long
 			Return lastIndexOf(c, m_Length - 1, m_Length)
 		End Function
 
-		Const Function LastIndexOf(c As StrChar, start As Long) As Long
+		Const Function LastIndexOf(c As Char, start As Long) As Long
 			rangeCheck(start)
 			Return lastIndexOf(c, start, start + 1)
 		End Function
 
-		Const Function LastIndexOf(c As StrChar, start As Long, count As Long) As Long
+		Const Function LastIndexOf(c As Char, start As Long, count As Long) As Long
 			rangeCheck(start)
 			Dim lastFindPos = start - (count - 1)
@@ -458,5 +447,5 @@
 		End Function
 	Private
-		Const Function lastIndexOf(c As StrChar, start As Long, count As Long) As Long
+		Const Function lastIndexOf(c As Char, start As Long, count As Long) As Long
 			Dim lastFindPos = start - (count - 1)
 			Dim i As Long
@@ -504,5 +493,5 @@
 		End Function
 
-		Const Function StartsWith(c As StrChar) As Boolean
+		Const Function StartsWith(c As Char) As Boolean
 			Return IndexOf(c) = 0
 		End Function
@@ -512,5 +501,5 @@
 		End Function
 
-		Const Function EndsWith(c As StrChar) As Boolean
+		Const Function EndsWith(c As Char) As Boolean
 			Return LastIndexOf(c) = m_Length - 1
 		End Function
@@ -556,5 +545,5 @@
 		End Function
 
-		Const Function Replace(oldChar As StrChar, newChar As StrChar) As String
+		Const Function Replace(oldChar As Char, newChar As Char) As String
 			Dim sb = New Text.StringBuilder(This)
 			sb.Replace(oldChar, newChar)
@@ -604,5 +593,5 @@
 		End Function
 
-		Sub CopyTo(sourceIndex As Long, destination As *StrChar, destinationIndex As Long, count As Long)
+		Sub CopyTo(sourceIndex As Long, destination As *Char, destinationIndex As Long, count As Long)
 			ActiveBasic.Strings.ChrCopy(VarPtr(destination[destinationIndex]), VarPtr(Chars[sourceIndex]), count As SIZE_T)
 		End Sub
@@ -618,8 +607,8 @@
 
 		Function PadLeft(total As Long) As String
-			PadLeft(total, &h30 As StrChar)
-		End Function
-
-		Function PadLeft(total As Long, c As StrChar) As String
+			PadLeft(total, &h30 As Char)
+		End Function
+
+		Function PadLeft(total As Long, c As Char) As String
 			If total < 0 Then
 				Throw New ArgumentOutOfRangeException("String.PadLeft: An arguments is out of range value.", "total")
@@ -635,8 +624,8 @@
 
 		Function PadRight(total As Long) As String
-			PadRight(total, &h30 As StrChar)
-		End Function
-
-		Function PadRight(total As Long, c As StrChar) As String
+			PadRight(total, &h30 As Char)
+		End Function
+
+		Function PadRight(total As Long, c As Char) As String
 			If total < 0 Then
 				Throw New ArgumentOutOfRangeException("String.PadRight: An arguments is out of range value.", "total")
@@ -651,9 +640,9 @@
 		End Function
 	Private
-		Function AllocStringBuffer(textLength As Long) As *StrChar
+		Function AllocStringBuffer(textLength As Long) As *Char
 			If textLength < 0 Then
 				Return 0
 			End If
-			AllocStringBuffer = GC_malloc_atomic(SizeOf(StrChar) * (textLength + 1))
+			AllocStringBuffer = GC_malloc_atomic(SizeOf(Char) * (textLength + 1))
 			If AllocStringBuffer = 0 Then
 				'Throw New OutOfMemoryException
@@ -663,5 +652,5 @@
 		End Function
 
-		Sub AssignFromStrChar(text As *StrChar, textLength As Long)
+		Sub AssignFromCharPtr(text As *Char, textLength As Long)
 			AllocStringBuffer(textLength)
 			ActiveBasic.Strings.ChrCopy(Chars, text, textLength As SIZE_T)
