Appends a null character at the end of the current string, without affecting the string length.
In case of overflow, if ThrowOnOverflow is false, the last character of the string is removed
and the string length is decreased by 1.