3 writes to _chars
System.Web.HttpUtility (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (3)
22
_chars
= initialBuffer;
29
_chars
= _arrayToReturnToPool;
315
_chars
= _arrayToReturnToPool = poolArray;
40 references to _chars
System.Web.HttpUtility (40)
src\libraries\Common\src\System\Text\ValueStringBuilder.AppendSpanFormattable.cs (1)
10
if (value.TryFormat(
_chars
.Slice(_pos), out int charsWritten, format, provider))
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (39)
39
Debug.Assert(value <=
_chars
.Length);
44
public int Capacity =>
_chars
.Length;
52
if ((uint)capacity > (uint)
_chars
.Length)
64
return ref MemoryMarshal.GetReference(
_chars
);
76
_chars
[Length] = '\0';
78
return ref MemoryMarshal.GetReference(
_chars
);
86
return ref
_chars
[index];
92
string s =
_chars
.Slice(0, _pos).ToString();
98
public Span<char> RawChars =>
_chars
;
109
_chars
[Length] = '\0';
111
return
_chars
.Slice(0, _pos);
114
public ReadOnlySpan<char> AsSpan() =>
_chars
.Slice(0, _pos);
115
public ReadOnlySpan<char> AsSpan(int start) =>
_chars
.Slice(start, _pos - start);
116
public ReadOnlySpan<char> AsSpan(int start, int length) =>
_chars
.Slice(start, length);
120
if (
_chars
.Slice(0, _pos).TryCopyTo(destination))
136
if (_pos >
_chars
.Length - count)
142
_chars
.Slice(index, remaining).CopyTo(
_chars
.Slice(index + count));
143
_chars
.Slice(index, count).Fill(value);
156
if (_pos > (
_chars
.Length - count))
162
_chars
.Slice(index, remaining).CopyTo(
_chars
.Slice(index + count));
167
.CopyTo(
_chars
.Slice(index));
175
Span<char> chars =
_chars
;
196
if (s.Length == 1 && (uint)pos < (uint)
_chars
.Length) // very common case, e.g. appending strings from NumberFormatInfo like separators, percent symbols, etc.
198
_chars
[pos] = s[0];
210
if (pos >
_chars
.Length - s.Length)
219
.CopyTo(
_chars
.Slice(pos));
225
if (_pos >
_chars
.Length - count)
230
Span<char> dst =
_chars
.Slice(_pos, count);
241
if (pos >
_chars
.Length - length)
246
Span<char> dst =
_chars
.Slice(_pos, length);
257
if (pos >
_chars
.Length - value.Length)
262
value.CopyTo(
_chars
.Slice(_pos));
270
if (origPos >
_chars
.Length - length)
276
return
_chars
.Slice(origPos, length);
298
Debug.Assert(_pos >
_chars
.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed.");
306
Math.Min((uint)
_chars
.Length * 2, ArrayMaxLength));
312
_chars
.Slice(0, _pos).CopyTo(poolArray);