Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 2250e2a

Browse files
authored
StringBuilder.Equals: value to span (#17311)
1 parent 1265ced commit 2250e2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mscorlib/shared/System/Text/StringBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,10 +1687,10 @@ public bool Equals(StringBuilder sb)
16871687
/// <summary>
16881688
/// Determines if the contents of this builder are equal to the contents of ReadOnlySpan<char>.
16891689
/// </summary>
1690-
/// <param name="value">The ReadOnlySpan{char}.</param>
1691-
public bool Equals(ReadOnlySpan<char> value)
1690+
/// <param name="span">The ReadOnlySpan{char}.</param>
1691+
public bool Equals(ReadOnlySpan<char> span)
16921692
{
1693-
if (value.Length != Length)
1693+
if (span.Length != Length)
16941694
return false;
16951695

16961696
StringBuilder sbChunk = this;
@@ -1703,7 +1703,7 @@ public bool Equals(ReadOnlySpan<char> value)
17031703

17041704
ReadOnlySpan<char> chunk = new ReadOnlySpan<char>(sbChunk.m_ChunkChars, 0, chunk_length);
17051705

1706-
if (!chunk.EqualsOrdinal(value.Slice(value.Length - offset, chunk_length)))
1706+
if (!chunk.EqualsOrdinal(span.Slice(span.Length - offset, chunk_length)))
17071707
return false;
17081708

17091709
sbChunk = sbChunk.m_ChunkPrevious;

0 commit comments

Comments
 (0)