void StripTrailingNewLines();
StripTrailingNewLines strips the trailing new lines in the buffer to make the buffer null terminated.