PostSharpAPI ReferencePost­Sharp.​Patterns.​FormattersUnsafe­String­BuilderSet­Null­Termination
Open sandboxFocus

UnsafeStringBuilder.SetNullTermination Method

SetNullTermination()

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.

Declaration
public bool SetNullTermination()
Returns
Type Description
System.Boolean

true if the string was null-terminated without affecting its length, or false if the last character of the string was replaced by the null character and the string length was decreased by 1.