4 writes to _chars
System.Private.Windows.Core (4)
System\Text\ValueStringBuilder.cs (4)
27
_chars
= ArrayPool<char>.Shared.Rent(
35
_chars
= initialBuffer;
42
_chars
= _arrayToReturnToPool;
339
_chars
= _arrayToReturnToPool = poolArray;
39 references to _chars
System.Private.Windows.Core (39)
System\Text\ValueStringBuilder.cs (39)
52
Debug.Assert(value <=
_chars
.Length);
57
public readonly int Capacity =>
_chars
.Length;
65
if ((uint)capacity > (uint)
_chars
.Length)
78
public readonly ref char GetPinnableReference() => ref MemoryMarshal.GetReference(
_chars
);
89
_chars
[Length] = '\0';
92
return ref MemoryMarshal.GetReference(
_chars
);
100
return ref
_chars
[index];
104
public override readonly string ToString() =>
_chars
[.._pos].ToString();
116
public readonly Span<char> RawChars =>
_chars
;
127
_chars
[Length] = '\0';
130
return
_chars
[.._pos];
133
public readonly ReadOnlySpan<char> AsSpan() =>
_chars
[.._pos];
134
public readonly ReadOnlySpan<char> AsSpan(int start) =>
_chars
[start.._pos];
135
public readonly ReadOnlySpan<char> AsSpan(int start, int length) =>
_chars
.Slice(start, length);
139
if (
_chars
[.._pos].TryCopyTo(destination))
155
if (_pos >
_chars
.Length - count)
161
_chars
.Slice(index, remaining).CopyTo(
_chars
[(index + count)..]);
162
_chars
.Slice(index, count).Fill(value);
175
if (_pos > (
_chars
.Length - count))
181
_chars
.Slice(index, remaining).CopyTo(
_chars
[(index + count)..]);
182
s.CopyTo(
_chars
[index..]);
190
if ((uint)pos < (uint)
_chars
.Length)
192
_chars
[pos] = c;
216
if (s.Length == 1 && (uint)pos < (uint)
_chars
.Length)
219
_chars
[pos] = s[0];
231
if (pos >
_chars
.Length - s.Length)
236
s.CopyTo(
_chars
[pos..]);
245
while (!((ISpanFormattable)value).TryFormat(
_chars
[_pos..], out charsWritten, format: default, provider: default))
260
if (_pos >
_chars
.Length - count)
265
Span<char> dst =
_chars
.Slice(_pos, count);
277
if (pos >
_chars
.Length - length)
282
Span<char> dst =
_chars
.Slice(_pos, length);
294
if (pos >
_chars
.Length - value.Length)
299
value.CopyTo(
_chars
[_pos..]);
322
Debug.Assert(_pos >
_chars
.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed.");
330
Math.Min((uint)
_chars
.Length * 2, ArrayMaxLength));
336
_chars
[.._pos].CopyTo(poolArray);