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

◆ CheckSchemeName()

static bool System.Uri.CheckSchemeName ( [NotNullWhen(true)] string? schemeName)
inlinestatic

Definition at line 1072 of file Uri.cs.

1073 {
1074 if (string.IsNullOrEmpty(schemeName) || !UriHelper.IsAsciiLetter(schemeName[0]))
1075 {
1076 return false;
1077 }
1078 for (int num = schemeName.Length - 1; num > 0; num--)
1079 {
1080 if (!UriHelper.IsAsciiLetterOrDigit(schemeName[num]) && schemeName[num] != '+' && schemeName[num] != '-' && schemeName[num] != '.')
1081 {
1082 return false;
1083 }
1084 }
1085 return true;
1086 }

References System.UriHelper.IsAsciiLetter(), and System.UriHelper.IsAsciiLetterOrDigit().

Referenced by System.UriParser.IsKnownScheme(), and System.UriParser.Register().