Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/LinkDotNet.StringBuilder/ValueStringBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Buffers;
using System.Buffers;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand Down Expand Up @@ -85,6 +85,18 @@ public readonly int Capacity
get => buffer.Length;
}

/// <summary>
/// Gets a value indicating whether the builder's length is 0.
/// </summary>
/// <value>
/// <see langword="true"/> if the builder is empty; otherwise, <see langword="false"/>.
/// </value>
public readonly bool IsEmpty
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => Length == 0;
}

/// <summary>
/// Returns the character at the given index or throws an <see cref="IndexOutOfRangeException"/> if the index is bigger than the string.
/// </summary>
Expand Down
Loading