File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/LinkDotNet.StringBuilder Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1- using System . Buffers ;
1+ using System . Buffers ;
22using System . Runtime . CompilerServices ;
33using System . Runtime . InteropServices ;
44
@@ -85,6 +85,18 @@ public readonly int Capacity
8585 get => buffer . Length ;
8686 }
8787
88+ /// <summary>
89+ /// Gets a value indicating whether the builder's length is 0.
90+ /// </summary>
91+ /// <value>
92+ /// <see langword="true"/> if the builder is empty; otherwise, <see langword="false"/>.
93+ /// </value>
94+ public readonly bool IsEmpty
95+ {
96+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
97+ get => Length == 0 ;
98+ }
99+
88100 /// <summary>
89101 /// Returns the character at the given index or throws an <see cref="IndexOutOfRangeException"/> if the index is bigger than the string.
90102 /// </summary>
You can’t perform that action at this time.
0 commit comments