17 writes to _pos
Microsoft.ML.Tokenizers (17)
Utils\ValueStringBuilder.cs (17)
25
_pos
= 0;
32
_pos
= 0;
42
_pos
= value;
133
_pos
--;
181
_pos
-= oldLength - newLength;
190
_pos
-= oldLength;
201
_pos
-= value.Length;
214
_pos
-= length;
239
_pos
+= count;
263
_pos
+= count;
274
_pos
= pos + 1;
294
_pos
= pos + 1;
315
_pos
+= s.Length;
330
_pos
+= count;
346
_pos
+= length;
358
_pos
+= value.Length;
370
_pos
= origPos + length;
37 references to _pos
Microsoft.ML.Tokenizers (37)
Utils\ValueStringBuilder.cs (37)
37
get =>
_pos
;
55
Grow(capacity -
_pos
);
87
Debug.Assert(index <
_pos
);
95
Span<char> span = _chars.Slice(0,
_pos
);
104
string s = _chars.Slice(0,
_pos
).ToString();
123
return _chars.Slice(0,
_pos
);
131
if (
_pos
> 0)
137
public ReadOnlySpan<char> AsSpan() => _chars.Slice(0,
_pos
);
138
public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start,
_pos
- start);
143
if (_chars.Slice(0,
_pos
).TryCopyTo(destination))
145
charsWritten =
_pos
;
163
while (index <=
_pos
- oldLength)
165
ReadOnlySpan<char> buffer = _chars.Slice(index,
_pos
- index);
180
_chars.Slice(newIndex,
_pos
- newIndex).CopyTo(_chars.Slice(index + newLength));
189
_chars.Slice(newIndex,
_pos
- newIndex).CopyTo(_chars.Slice(index + newLength));
210
if (length > 0 && start + length <=
_pos
)
212
int remaining =
_pos
- start - length;
221
if (valueLength >
_pos
)
226
return _chars.Slice(
_pos
- valueLength, valueLength).SequenceEqual(value.AsSpan());
231
if (
_pos
> _chars.Length - count)
236
int remaining =
_pos
- index;
251
if (
_pos
> (_chars.Length - count))
256
int remaining =
_pos
- index;
269
int pos =
_pos
;
290
int pos =
_pos
;
304
int pos =
_pos
;
320
if (
_pos
> _chars.Length - count)
325
Span<char> dst = _chars.Slice(
_pos
, count);
335
int pos =
_pos
;
341
Span<char> dst = _chars.Slice(
_pos
, length);
351
int pos =
_pos
;
357
value.CopyTo(_chars.Slice(
_pos
));
364
int origPos =
_pos
;
386
/// <see cref="
_pos
"/> whichever is greater.
395
Debug.Assert(
_pos
> _chars.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed.");
400
(uint)(
_pos
+ additionalCapacityBeyondPos),
407
_chars.Slice(0,
_pos
).CopyTo(poolArray);