Index: Include/Classes/System/String.ab
===================================================================
--- Include/Classes/System/String.ab	(revision 29)
+++ Include/Classes/System/String.ab	(revision 30)
@@ -1,10 +1,10 @@
 Class String
+	m_Chars As LPSTR
+	m_Length As Long
 Public
-	Chars As LPSTR
-	Length As Long
 
 	Sub String()
-		Chars = _System_calloc(1)
-		Length = 0
+		m_Chars = _System_calloc(1)
+		m_Length = 0
 	End Sub
 
@@ -13,6 +13,6 @@
 		Assign(initStr)
 	End Sub
-/*
-	Sub String(ByRef initStr As String)
+
+/*	Sub String(ByRef initStr As String)
 		String()
 		Assign(initStr)
@@ -29,17 +29,25 @@
 
 	Sub ~String()
-		_System_free(Chars)
-		Chars = 0
+		_System_free(m_Chars)
+		m_Chars = 0
 #ifdef _DEBUG
-		Length = 0
+		m_Length = 0
 #endif
 	End Sub
 
+	Function Chars() As LPSTR
+		Return m_Chars
+	End Function
+
+	Function Length() As Long
+		Return m_Length
+	End Function
+
 	Function Operator() As LPSTR
-		Return Chars
+		Return m_Chars
 	End Function
 
 	Sub Operator = (ByRef objString As String)
-		Assign(objString.Chars, objString.Length)
+		Assign(objString.m_Chars, objString.m_Length)
 	End Sub
 
@@ -49,9 +57,9 @@
 
 	Function Operator[] (n As Long) As Byte
-		Return Chars[n]
+		Return m_Chars[n]
 	End Function
 
 	Sub Operator[]= (n As Long, c As Byte)
-		Chars[n] = c
+		m_Chars[n] = c
 	End Sub
 
@@ -61,5 +69,5 @@
 
 	Function Operator+ (ByRef objString As String) As String
-		Return Concat(objString, objString.Length)
+		Return Concat(objString, objString.m_Length)
 	End Function
 
@@ -165,18 +173,18 @@
 
 	Function StrPtr() As LPSTR
-		Return Chars
+		Return m_Chars
 	End Function
 
 	Sub ReSize(allocLength As Long)
 		If allocLength < 0 Then Exit Sub
-		If allocLength > Length Then
+		If allocLength > m_Length Then
 			Dim oldLength As Long
-			oldLength = Length
+			oldLength = m_Length
 			If AllocStringBuffer(allocLength) <> 0 Then
-				ZeroMemory(Chars + oldLength, Length - oldLength + 1)
+				ZeroMemory(m_Chars + oldLength, m_Length - oldLength + 1)
 			End If
 		Else
-			Length = allocLength
-			Chars[Length] = 0
+			m_Length = allocLength
+			m_Chars[m_Length] = 0
 		End If
 	End Sub
@@ -185,26 +193,26 @@
 		If allocLength < 0 Then
 			Exit Sub
-		ElseIf allocLength > Length Then
+		ElseIf allocLength > m_Length Then
 			Dim oldLength As Long
-			oldLength = Length
+			oldLength = m_Length
 			If AllocStringBuffer(allocLength) <> 0 Then
-				FillMemory(Chars + oldLength, Length - oldLength, c)
+				FillMemory(m_Chars + oldLength, m_Length - oldLength, c)
 			End If
 		Else
-			Length = allocLength
-		End If
-		Chars[Length] = 0
+			m_Length = allocLength
+		End If
+		m_Chars[m_Length] = 0
 	End Sub
 
 	Sub Assign(lpszText As LPSTR, textLength As Long)
-		If lpszText = Chars Then Exit Sub
+		If lpszText = m_Chars Then Exit Sub
 		If AllocStringBuffer(textLength) <> 0 Then
-			memcpy(Chars, lpszText, textLength)
-			Chars[Length] = 0
+			memcpy(m_Chars, lpszText, textLength)
+			m_Chars[m_Length] = 0
 		End If		
 	End Sub
 
 	Sub Assign(ByRef objString As String)
-		Assign(objString.Chars, objString.Length)
+		Assign(objString.m_Chars, objString.m_Length)
 	End Sub
 
@@ -213,7 +221,7 @@
 			Assign(lpszText, lstrlen(lpszText))
 		Else
-			'Chars=_System_realloc(Chars,1)
-			Chars[0] = 0
-			Length = 0
+			'm_Chars=_System_realloc(m_Chars,1)
+			m_Chars[0] = 0
+			m_Length = 0
 		End If
 	End Sub
@@ -221,8 +229,8 @@
 	Sub Append(lpszText As LPSTR, textLength As Long)
 		Dim prevLen As Long
-		prevLen = Length
-		If AllocStringBuffer(Length + textLength) <> 0 Then
-			memcpy(Chars + prevLen, lpszText, textLength)
-			Chars[Length] = 0
+		prevLen = m_Length
+		If AllocStringBuffer(m_Length + textLength) <> 0 Then
+			memcpy(m_Chars + prevLen, lpszText, textLength)
+			m_Chars[m_Length] = 0
 		End If
 	End Sub
@@ -233,5 +241,5 @@
 
 	Sub Append(ByRef str As String)
-		Append(str.Chars, str.Length)
+		Append(str.m_Chars, str.m_Length)
 	End Sub
 
@@ -239,8 +247,8 @@
 		Dim tempString As String
 		With tempString
-			.AllocStringBuffer(This.Length + textLength)
-			memcpy(.Chars, This.Chars, This.Length)
-			memcpy(.Chars + This.Length, lpszText, textLength)
-			.Chars[.Length] = 0
+			.AllocStringBuffer(This.m_Length + textLength)
+			memcpy(.m_Chars, This.m_Chars, This.m_Length)
+			memcpy(.m_Chars + This.m_Length, lpszText, textLength)
+			.m_Chars[.m_Length] = 0
 		End With
 		Return tempString
@@ -248,5 +256,5 @@
 
 	Function Contains(ByRef objString As String) As BOOL
-		If IndexOf(objString, 0, Length) >= 0 Then
+		If IndexOf(objString, 0, m_Length) >= 0 Then
 			Return _System_TRUE
 		Else
@@ -256,5 +264,5 @@
 
 	Function Contains(lpszText As LPSTR) As BOOL
-		If IndexOf(lpszText, 0, Length) >= 0 Then
+		If IndexOf(lpszText, 0, m_Length) >= 0 Then
 			Return _System_TRUE
 		Else
@@ -264,9 +272,9 @@
 
 	Function IndexOf(lpszText As LPSTR) As Long
-		Return IndexOf(lpszText, 0, Length)
+		Return IndexOf(lpszText, 0, m_Length)
 	End Function
 
 	Function IndexOf(lpszText As LPSTR, startIndex As Long) As Long
-		Return IndexOf(lpszText, startIndex, Length - startIndex)
+		Return IndexOf(lpszText, startIndex, m_Length - startIndex)
 	End Function
 
@@ -276,6 +284,6 @@
 
 		If startIndex < 0 Then Return -1
-		If count < 1 Or count + startIndex > Length Then Return -1
-		If length > Length Then Return -1
+		If count < 1 Or count + startIndex > m_Length Then Return -1
+		If length > m_Length Then Return -1
 
 		If length = 0 Then Return startIndex
@@ -284,5 +292,5 @@
 		For i = startIndex To startIndex + count - 1
 			For j = 0 To length - 1
-				If Chars[i + j] = lpszText[j] Then
+				If m_Chars[i + j] = lpszText[j] Then
 					If j = length - 1 Then Return i
 				Else
@@ -295,5 +303,5 @@
 
 	Function LastIndexOf(lpszText As LPSTR) As Long
-		Return LastIndexOf(lpszText, Length - 1, Length)
+		Return LastIndexOf(lpszText, m_Length - 1, m_Length)
 	End Function
 
@@ -306,7 +314,7 @@
 		length = lstrlen(lpszText)
 
-		If startIndex < 0 Or startIndex > Length - 1 Then Return -1
+		If startIndex < 0 Or startIndex > m_Length - 1 Then Return -1
 		If count < 1 Or count > startIndex + 2 Then Return -1
-		If length > Length Then Return -1
+		If length > m_Length Then Return -1
 
 		If length = 0 Then Return startIndex
@@ -315,5 +323,5 @@
 		For i = startIndex To  startIndex - count + 1 Step -1
 			For j = length - 1 To 0 Step -1
-				If Chars[i + j] = lpszText[j] Then
+				If m_Chars[i + j] = lpszText[j] Then
 					If j = 0 Then Return i
 				Else
@@ -334,5 +342,5 @@
 
 	Function EndsWith(lpszText As LPSTR) As BOOL
-		If LastIndexOf(lpszText) = Length - lstrlen(lpszText) Then
+		If LastIndexOf(lpszText) = m_Length - lstrlen(lpszText) Then
 			Return _System_TRUE
 		Else
@@ -345,62 +353,62 @@
 		length = lstrlen(lpszText)
 
-		If startIndex < 0 Or startIndex > Length Then Return -1
+		If startIndex < 0 Or startIndex > m_Length Then Return -1
 
 		Dim newChars As LPSTR
-		newChars = _System_malloc(length + Length + 1)
+		newChars = _System_malloc(length + m_Length + 1)
 		If newChars = 0 Then Return -1
 
-		memcpy(newChars, Chars, startIndex)
+		memcpy(newChars, m_Chars, startIndex)
 		memcpy(newChars + startIndex, lpszText, length)
-		memcpy(newChars + startIndex + length, Chars + startIndex, Length - startIndex + 1)
-
-		_System_free(Chars)
-		Chars = newChars
-		Length = length + Length
-		Return Length
+		memcpy(newChars + startIndex + length, m_Chars + startIndex, m_Length - startIndex + 1)
+
+		_System_free(m_Chars)
+		m_Chars = newChars
+		m_Length = length + m_Length
+		Return m_Length
 	End Function
 
 	Function SubString(startIndex As Long) As String
-		Return SubString(startIndex, Length - startIndex)
+		Return SubString(startIndex, m_Length - startIndex)
 	End Function
 
 	Function SubString(startIndex As Long, length As Long) As String
 		If startIndex < 0 Or length <= 0 Then Return ""
-		If startIndex + length > Length Then Return ""
+		If startIndex + length > m_Length Then Return ""
 
 		Dim temp As String
 		temp.AllocStringBuffer(length)
-		memcpy(temp.Chars, VarPtr(Chars[startIndex]), length)
-		Chars[Length] = 0
+		memcpy(temp.m_Chars, VarPtr(m_Chars[startIndex]), length)
+		m_Chars[m_Length] = 0
 		Return temp
 	End Function
 
 	Function Remove(startIndex As Long) As Long
-		If startIndex < 0 Or startIndex > Length Then Return -1
-		Chars[startIndex] = 0
-		Length = startIndex
-		Return Length
+		If startIndex < 0 Or startIndex > m_Length Then Return -1
+		m_Chars[startIndex] = 0
+		m_Length = startIndex
+		Return m_Length
 	End Function
 
 	Function Remove(startIndex As Long, count As Long) As Long
 		If startIndex < 0 Or count < 0 Then Return -1
-		If startIndex + count > Length Then Return -1
+		If startIndex + count > m_Length Then Return -1
 
 		Dim newChars As LPSTR
-		newChars = _System_malloc(Length - count + 1)
+		newChars = _System_malloc(m_Length - count + 1)
 		If newChars = 0 Then Return -1
 
-		memcpy(newChars, Chars, startIndex)
-		memcpy(newChars + startIndex, Chars + startIndex + count, Length - startIndex - count)
-		newChars[Length - count] = 0
-
-		_System_free(Chars)
-		Chars = newChars
-		Length = Length - count
-		Return Length
+		memcpy(newChars, m_Chars, startIndex)
+		memcpy(newChars + startIndex, m_Chars + startIndex + count, m_Length - startIndex - count)
+		newChars[m_Length - count] = 0
+
+		_System_free(m_Chars)
+		m_Chars = newChars
+		m_Length = m_Length - count
+		Return m_Length
 	End Function
 
 	Function IsNullOrEmpty() As BOOL
-		If Length = 0 Then
+		If m_Length = 0 Then
 			Return _System_TRUE
 		Else
@@ -411,7 +419,7 @@
 	Sub Replace(oldChar As Byte, newChar As Byte)
 		Dim i As Long
-		For i = 0 To ELM(Length)
-			If Chars[i] = oldChar Then
-				Chars[i] = newChar
+		For i = 0 To ELM(m_Length)
+			If m_Chars[i] = oldChar Then
+				m_Chars[i] = newChar
 			End If
 		Next
@@ -419,5 +427,5 @@
 
 	Sub Replace(ByRef oldStr As String, ByRef newStr As String)
-		Replace(oldStr, oldStr.Length, newStr, newStr.Length)
+		Replace(oldStr, oldStr.m_Length, newStr, newStr.m_Length)
 	End Sub
 
@@ -436,9 +444,9 @@
 					Exit Do
 				End If
-				.Append(Chars + current, pos - current)
+				.Append(m_Chars + current, pos - current)
 				.Append(newStr, newLen)
 				current = pos + oldLen
 			Loop
-			.Append(Chars + current, Length - current)
+			.Append(m_Chars + current, m_Length - current)
 		End With
 		Swap(tempString)
@@ -446,9 +454,9 @@
 
 	Sub ToLower()
-		CharLower(Chars)
+		CharLower(m_Chars)
 	End Sub
 
 	Sub ToUpper()
-		CharUpper(Chars)
+		CharUpper(m_Chars)
 	End Sub
 
@@ -456,10 +464,10 @@
 		Dim tempLen As Long
 		Dim tempChars As PSTR
-		tempLen = x.Length
-		tempChars = x.Chars
-		x.Length = This.Length
-		x.Chars = This.Chars
-		This.Length = tempLen
-		This.Chars = tempChars
+		tempLen = x.m_Length
+		tempChars = x.m_Chars
+		x.m_Length = This.m_Length
+		x.m_Chars = This.m_Chars
+		This.m_Length = tempLen
+		This.m_Chars = tempChars
 	End Sub
 
@@ -469,13 +477,13 @@
 		If textLength < 0 Then
 			Return 0
-		ElseIf textLength > Length Then
-			AllocStringBuffer = _System_realloc(Chars, textLength + 1)
+		ElseIf textLength > m_Length Then
+			AllocStringBuffer = _System_realloc(m_Chars, textLength + 1)
 			If AllocStringBuffer <> 0 Then
-				Length = textLength
-				Chars = AllocStringBuffer
+				m_Length = textLength
+				m_Chars = AllocStringBuffer
 			End If
 		Else
-			Length = textLength
-			AllocStringBuffer = Chars
+			m_Length = textLength
+			AllocStringBuffer = m_Chars
 		End If
 	End Function
