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