Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MayOverlap()

static bool System.Text.RegularExpressions.RegexCharClass.MayOverlap ( string set1,
string set2 )
inlinestatic

Definition at line 721 of file RegexCharClass.cs.

722 {
723 if (set1 == set2)
724 {
725 return true;
726 }
727 if (set1 == "\0\u0001\0\0" || set2 == "\0\u0001\0\0")
728 {
729 return true;
730 }
731 bool flag = IsNegated(set1);
732 bool flag2 = IsNegated(set2);
733 if (flag != flag2)
734 {
735 return !set1.AsSpan(1).SequenceEqual(set2.AsSpan(1));
736 }
737 if (flag)
738 {
739 return true;
740 }
742 {
743 return false;
744 }
746 {
748 }
750 {
752 }
753 return true;
754 static bool KnownDistinctSets(string set1, string set2)
755 {
756 if (set1 == "\0\0\u0001d" || set1 == "\0\u0004\0\t\u000e !")
757 {
758 switch (set2)
759 {
760 default:
761 return set2 == "\0\n\00:A[_`a{İı";
762 case "\0\0\u0001\t":
763 case "\0\0\n\0\u0002\u0004\u0005\u0003\u0001\u0006\t\u0013\0":
764 case "\0\u0002\00:":
765 return true;
766 }
767 }
768 return false;
769 }
770 static bool MayOverlapByEnumeration(string set1, string set2)
771 {
772 for (int i = 3; i < 3 + set2[1]; i += 2)
773 {
774 int num = set2[i + 1];
775 for (int j = set2[i]; j < num; j++)
776 {
777 if (CharInClass((char)j, set1))
778 {
779 return true;
780 }
781 }
782 }
783 return false;
784 }
785 }
static bool CharInClass(char ch, string set, ref int[] asciiResultCache)
static bool CanEasilyEnumerateSetContents(string set)

References System.Text.RegularExpressions.RegexCharClass.CanEasilyEnumerateSetContents(), System.Text.RegularExpressions.RegexCharClass.CharInClass(), System.Text.RegularExpressions.i, and System.Text.RegularExpressions.RegexCharClass.IsNegated().

Referenced by System.Text.RegularExpressions.RegexNode.CanBeMadeAtomic().