1 write to Chars
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
569
result.
Chars
= scratch.Slice(0, count).ToArray();
24 references to Chars
System.Text.RegularExpressions (24)
System\Text\RegularExpressions\RegexCompiler.cs (12)
916
if (primarySet.
Chars
is not null)
918
Debug.Assert(primarySet.
Chars
.Length > 0);
919
switch (primarySet.
Chars
.Length)
923
Ldc(primarySet.
Chars
[0]);
929
Ldc(primarySet.
Chars
[0]);
930
Ldc(primarySet.
Chars
[1]);
936
Ldc(primarySet.
Chars
[0]);
937
Ldc(primarySet.
Chars
[1]);
938
Ldc(primarySet.
Chars
[2]);
945
EmitIndexOfAnyWithSearchValuesOrLiteral(primarySet.
Chars
, except: primarySet.Negated);
1180
if (set.
Chars
is { Length: 1 })
1189
Ldc(set.
Chars
[0]);
System\Text\RegularExpressions\RegexFindOptimizations.cs (9)
233
(fixedDistanceSets[0].
Chars
is not null && !fixedDistanceSets[0].Negated))
240
fixedDistanceSets[0].
Chars
is { Length: 1 } &&
243
FixedDistanceLiteral = (fixedDistanceSets[0].
Chars
![0], null, fixedDistanceSets[0].Distance);
331
/// <summary>As an alternative to <see cref="
Chars
"/>, a description of the single range the set represents, if it does.</summary>
356
char[]? chars = i < fixedDistanceSets.Count ? fixedDistanceSets[i].
Chars
: null;
652
char[]? chars = primarySet.
Chars
;
747
if (primarySet.
Chars
is { Length: <= 5 }) // 5 == currently the max length efficiently handled by IndexOfAny{Except}
753
int index = primarySet.Negated ? textSpanAtOffset.IndexOfAnyExcept(primarySet.
Chars
) : textSpanAtOffset.IndexOfAny(primarySet.
Chars
);
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (3)
522
!r.Negated && r.
Chars
is null && r.Range is null,
793
char[]? s1Chars = s1.
Chars
;
794
char[]? s2Chars = s2.
Chars
;