diff --git a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs index 0f1fcb7..e7f4842 100644 --- a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs +++ b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs @@ -1,4 +1,4 @@ -using System.Buffers; +using System.Buffers; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -85,6 +85,18 @@ public readonly int Capacity get => buffer.Length; } + /// + /// Gets a value indicating whether the builder's length is 0. + /// + /// + /// if the builder is empty; otherwise, . + /// + public readonly bool IsEmpty + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => Length == 0; + } + /// /// Returns the character at the given index or throws an if the index is bigger than the string. ///