3 writes to _chars
System.Private.Windows.Core (3)
System\Text\ValueStringBuilder.cs (3)
24_chars = initialBuffer; 31_chars = _arrayToReturnToPool; 315_chars = _arrayToReturnToPool = poolArray;
40 references to _chars
System.Private.Windows.Core (40)
System\Text\ValueStringBuilder.cs (40)
41Debug.Assert(value <= _chars.Length); 46public readonly int Capacity => _chars.Length; 54if ((uint)capacity > (uint)_chars.Length) 67public readonly ref char GetPinnableReference() => ref MemoryMarshal.GetReference(_chars); 78_chars[Length] = '\0'; 81return ref MemoryMarshal.GetReference(_chars); 89return ref _chars[index]; 95string s = _chars[.._pos].ToString(); 103public readonly Span<char> RawChars => _chars; 114_chars[Length] = '\0'; 117return _chars[.._pos]; 120public readonly ReadOnlySpan<char> AsSpan() => _chars[.._pos]; 121public readonly ReadOnlySpan<char> AsSpan(int start) => _chars[start.._pos]; 122public readonly ReadOnlySpan<char> AsSpan(int start, int length) => _chars.Slice(start, length); 126if (_chars[.._pos].TryCopyTo(destination)) 142if (_pos > _chars.Length - count) 148_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]); 149_chars.Slice(index, count).Fill(value); 162if (_pos > (_chars.Length - count)) 168_chars.Slice(index, remaining).CopyTo(_chars[(index + count)..]); 169s.CopyTo(_chars[index..]); 177if ((uint)pos < (uint)_chars.Length) 179_chars[pos] = c; 197if (s.Length == 1 && (uint)pos < (uint)_chars.Length) 200_chars[pos] = s[0]; 212if (pos > _chars.Length - s.Length) 217s.CopyTo(_chars[pos..]); 223if (_pos > _chars.Length - count) 228Span<char> dst = _chars.Slice(_pos, count); 240if (pos > _chars.Length - length) 245Span<char> dst = _chars.Slice(_pos, length); 257if (pos > _chars.Length - value.Length) 262value.CopyTo(_chars[_pos..]); 270if (origPos > _chars.Length - length) 276return _chars.Slice(origPos, length); 298Debug.Assert(_pos > _chars.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed."); 306Math.Min((uint)_chars.Length * 2, ArrayMaxLength)); 312_chars[.._pos].CopyTo(poolArray);