Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ CharInClass() [2/2]

static bool System.Text.RegularExpressions.RegexCharClass.CharInClass ( char ch,
string set,
ref int[] asciiResultCache )
inlinestatic

Definition at line 872 of file RegexCharClass.cs.

873 {
874 if (ch < '\u0080')
875 {
876 if (asciiResultCache == null)
877 {
879 }
880 ref int reference = ref asciiResultCache[(int)ch >> 4];
881 int num = 1 << ((ch & 0xF) << 1);
882 int num2 = num << 1;
883 int num3 = reference;
884 if ((num3 & num) != 0)
885 {
886 return (num3 & num2) != 0;
887 }
888 bool flag = CharInClass(ch, set);
889 int num4 = num;
890 if (flag)
891 {
892 num4 |= num2;
893 }
895 return flag;
896 }
897 return CharInClassRecursive(ch, set, 0);
898 }
static bool CharInClassRecursive(char ch, string set, int start)
static bool CharInClass(char ch, string set, ref int[] asciiResultCache)
static int CompareExchange(ref int location1, int value, int comparand)
static int Or(ref int location1, int value)

References System.ch, System.Text.RegularExpressions.RegexCharClass.CharInClass(), System.Text.RegularExpressions.RegexCharClass.CharInClassRecursive(), System.Threading.Interlocked.CompareExchange(), and System.Threading.Interlocked.Or().

Referenced by System.Text.RegularExpressions.RegexNode.CanBeMadeAtomic(), System.Text.RegularExpressions.RegexRunner.CharInClass(), System.Text.RegularExpressions.RegexCharClass.CharInClass(), System.Text.RegularExpressions.RegexRunner.CharInSet(), System.Text.RegularExpressions.RegexCompiler.EmitMatchCharacterClass(), System.Text.RegularExpressions.RegexInterpreter.FindFirstChar(), System.Text.RegularExpressions.RegexInterpreter.Go(), and System.Text.RegularExpressions.RegexCharClass.MayOverlap().