4 writes to _chars
System.Private.Windows.Core (4)
System\Text\ValueStringBuilder.cs (4)
29
_chars
= ArrayPool<char>.Shared.Rent(
37
_chars
= initialBuffer;
44
_chars
= _arrayToReturnToPool;
341
_chars
= _arrayToReturnToPool = poolArray;
39 references to _chars
System.Private.Windows.Core (39)
System\Text\ValueStringBuilder.cs (39)
54
Debug.Assert(value <=
_chars
.Length);
59
public readonly int Capacity =>
_chars
.Length;
67
if ((uint)capacity > (uint)
_chars
.Length)
80
public readonly ref char GetPinnableReference() => ref MemoryMarshal.GetReference(
_chars
);
91
_chars
[Length] = '\0';
94
return ref MemoryMarshal.GetReference(
_chars
);
102
return ref
_chars
[index];
106
public override readonly string ToString() =>
_chars
[.._pos].ToString();
118
public readonly Span<char> RawChars =>
_chars
;
129
_chars
[Length] = '\0';
132
return
_chars
[.._pos];
135
public readonly ReadOnlySpan<char> AsSpan() =>
_chars
[.._pos];
136
public readonly ReadOnlySpan<char> AsSpan(int start) =>
_chars
[start.._pos];
137
public readonly ReadOnlySpan<char> AsSpan(int start, int length) =>
_chars
.Slice(start, length);
141
if (
_chars
[.._pos].TryCopyTo(destination))
157
if (_pos >
_chars
.Length - count)
163
_chars
.Slice(index, remaining).CopyTo(
_chars
[(index + count)..]);
164
_chars
.Slice(index, count).Fill(value);
177
if (_pos > (
_chars
.Length - count))
183
_chars
.Slice(index, remaining).CopyTo(
_chars
[(index + count)..]);
184
s.CopyTo(
_chars
[index..]);
192
if ((uint)pos < (uint)
_chars
.Length)
194
_chars
[pos] = c;
218
if (s.Length == 1 && (uint)pos < (uint)
_chars
.Length)
221
_chars
[pos] = s[0];
233
if (pos >
_chars
.Length - s.Length)
238
s.CopyTo(
_chars
[pos..]);
247
while (!((ISpanFormattable)value).TryFormat(
_chars
[_pos..], out charsWritten, format: default, provider: default))
262
if (_pos >
_chars
.Length - count)
267
Span<char> dst =
_chars
.Slice(_pos, count);
279
if (pos >
_chars
.Length - length)
284
Span<char> dst =
_chars
.Slice(_pos, length);
296
if (pos >
_chars
.Length - value.Length)
301
value.CopyTo(
_chars
[_pos..]);
324
Debug.Assert(_pos >
_chars
.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed.");
332
Math.Min((uint)
_chars
.Length * 2, ArrayMaxLength));
338
_chars
[.._pos].CopyTo(poolArray);