3 writes to _chars
Microsoft.Extensions.DataIngestion (3)
Chunkers\ValueStringBuilder.cs (3)
27
_chars
= initialBuffer;
34
_chars
= _arrayToReturnToPool;
270
_chars
= _arrayToReturnToPool = poolArray;
33 references to _chars
Microsoft.Extensions.DataIngestion (33)
Chunkers\ValueStringBuilder.cs (33)
44
Debug.Assert(value <=
_chars
.Length);
49
public int Capacity =>
_chars
.Length;
57
if ((uint)capacity > (uint)
_chars
.Length)
68
_chars
[_pos] = '\0';
79
return ref MemoryMarshal.GetReference(
_chars
);
87
return ref
_chars
[index];
93
string s =
_chars
.Slice(0, _pos).ToString();
99
public Span<char> RawChars =>
_chars
;
101
public ReadOnlySpan<char> AsSpan() =>
_chars
.Slice(0, _pos);
102
public ReadOnlySpan<char> AsSpan(int start) =>
_chars
.Slice(start, _pos - start);
103
public ReadOnlySpan<char> AsSpan(int start, int length) =>
_chars
.Slice(start, length);
107
if (_pos >
_chars
.Length - count)
113
_chars
.Slice(index, remaining).CopyTo(
_chars
.Slice(index + count));
114
_chars
.Slice(index, count).Fill(value);
127
if (_pos > (
_chars
.Length - count))
133
_chars
.Slice(index, remaining).CopyTo(
_chars
.Slice(index + count));
138
.CopyTo(
_chars
.Slice(index));
146
Span<char> chars =
_chars
;
167
if (s.Length == 1 && (uint)pos < (uint)
_chars
.Length) // very common case, e.g. appending strings from NumberFormatInfo like separators, percent symbols, etc.
169
_chars
[pos] = s[0];
181
if (pos >
_chars
.Length - s.Length)
190
.CopyTo(
_chars
.Slice(pos));
196
if (_pos >
_chars
.Length - count)
201
Span<char> dst =
_chars
.Slice(_pos, count);
212
if (pos >
_chars
.Length - value.Length)
217
value.CopyTo(
_chars
.Slice(_pos));
225
if (origPos >
_chars
.Length - length)
231
return
_chars
.Slice(origPos, length);
253
Debug.Assert(_pos >
_chars
.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed.");
261
Math.Min((uint)
_chars
.Length * 2, ArrayMaxLength));
267
_chars
.Slice(0, _pos).CopyTo(poolArray);