bool endsWith (string str)
{
int bufferLength = this.Buffer.Length;
if (bufferLength < str.Length)
{
return false;
}
for (int i = 0; i < str.Length; i++)
{
int bi = bufferLength - str.Length + i;
if(str[i] != this.Buffer[bi])return false;
}
return true;
}