1 write to Chars
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
569result.Chars = scratch.Slice(0, count).ToArray();
24 references to Chars
System.Text.RegularExpressions (24)
System\Text\RegularExpressions\RegexCompiler.cs (12)
935if (primarySet.Chars is not null) 937Debug.Assert(primarySet.Chars.Length > 0); 938switch (primarySet.Chars.Length) 942Ldc(primarySet.Chars[0]); 948Ldc(primarySet.Chars[0]); 949Ldc(primarySet.Chars[1]); 955Ldc(primarySet.Chars[0]); 956Ldc(primarySet.Chars[1]); 957Ldc(primarySet.Chars[2]); 964EmitIndexOfAnyWithSearchValuesOrLiteral(primarySet.Chars, except: primarySet.Negated); 1199if (set.Chars is { Length: 1 }) 1208Ldc(set.Chars[0]);
System\Text\RegularExpressions\RegexFindOptimizations.cs (9)
233(fixedDistanceSets[0].Chars is not null && !fixedDistanceSets[0].Negated)) 240fixedDistanceSets[0].Chars is { Length: 1 } && 243FixedDistanceLiteral = (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> 356char[]? chars = i < fixedDistanceSets.Count ? fixedDistanceSets[i].Chars : null; 652char[]? chars = primarySet.Chars; 747if (primarySet.Chars is { Length: <= 5 }) // 5 == currently the max length efficiently handled by IndexOfAny{Except} 753int 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, 793char[]? s1Chars = s1.Chars; 794char[]? s2Chars = s2.Chars;