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

◆ SetFromProperty()

static ReadOnlySpan< char > System.Text.RegularExpressions.RegexCharClass.SetFromProperty ( string capname,
bool invert,
string pattern,
int currentPos )
inlinestaticprivate

Definition at line 1192 of file RegexCharClass.cs.

1193 {
1194 int num = 0;
1195 int num2 = s_propTable.Length;
1196 while (num != num2)
1197 {
1198 int num3 = (num + num2) / 2;
1199 int num4 = string.Compare(capname, s_propTable[num3][0], StringComparison.Ordinal);
1200 if (num4 < 0)
1201 {
1202 num2 = num3;
1203 continue;
1204 }
1205 if (num4 > 0)
1206 {
1207 num = num3 + 1;
1208 continue;
1209 }
1210 string text = s_propTable[num3][1];
1211 if (invert)
1212 {
1213 if (text[0] != 0)
1214 {
1215 return "\0" + text;
1216 }
1217 return text.AsSpan(1);
1218 }
1219 return text;
1220 }
1221 throw new RegexParseException(RegexParseError.UnrecognizedUnicodeProperty, currentPos, System.SR.Format(System.SR.MakeException, pattern, currentPos, System.SR.Format(System.SR.UnrecognizedUnicodeProperty, capname)));
1222 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string UnrecognizedUnicodeProperty
Definition SR.cs:96
static string MakeException
Definition SR.cs:56
Definition SR.cs:7

References System.SR.Format(), System.SR.MakeException, System.Text.RegularExpressions.pattern, System.Text.RegularExpressions.RegexCharClass.s_propTable, System.text, and System.SR.UnrecognizedUnicodeProperty.

Referenced by System.Text.RegularExpressions.RegexCharClass.AddCategoryFromName().