3 writes to Length
Microsoft.NET.StringTools (3)
InternableString.cs (3)
124
Length
= span.Length;
143
Length
= str.Length;
156
Length
= stringBuilder.Length;
14 references to Length
Microsoft.NET.StringTools (11)
InternableString.cs (9)
183
if (other.Length !=
Length
)
215
if (
Length
== 0)
221
if (_inlineSpan.Length ==
Length
)
232
if (_inlineSpan.IsEmpty && _spans?[0].Length ==
Length
)
240
string result = new string((char)0,
Length
);
273
if (destPtr != resultPtr +
Length
)
275
throw new InvalidOperationException($"Length of {
Length
} does not match the sum of span lengths of {destPtr - resultPtr}.");
288
if (_inlineSpan.Length ==
Length
)
292
if (_inlineSpan.IsEmpty && _spans?.Count == 1 && _spans[0].Length ==
Length
)
WeakStringCacheInterner.cs (2)
78
if (candidate.
Length
== 0)
113
_internEliminatedChars += candidate.
Length
;
Microsoft.NET.StringTools.UnitTests (3)
SpanBasedStringBuilder_Tests.cs (3)
77
internableString.Equals(string.Empty).ShouldBe(internableString.
Length
== 0);
80
internableString.Equals(substr).ShouldBe(substr.Length == internableString.
Length
);
85
internableString.Equals(substr).ShouldBe(substr.Length == internableString.
Length
);