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)
916if (primarySet.Chars is not null) 918Debug.Assert(primarySet.Chars.Length > 0); 919switch (primarySet.Chars.Length) 923Ldc(primarySet.Chars[0]); 929Ldc(primarySet.Chars[0]); 930Ldc(primarySet.Chars[1]); 936Ldc(primarySet.Chars[0]); 937Ldc(primarySet.Chars[1]); 938Ldc(primarySet.Chars[2]); 945EmitIndexOfAnyWithSearchValuesOrLiteral(primarySet.Chars, except: primarySet.Negated); 1180if (set.Chars is { Length: 1 }) 1189Ldc(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;