Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ExtensionMethods.cs
Go to the documentation of this file.
2
3internal static class ExtensionMethods
4{
5 internal static Uri ToUri(string s)
6 {
7 if (s != null && s.Length > 0)
8 {
9 s = s.Trim(' ', '\t', '\n', '\r');
10 if (s.Length == 0 || s.IndexOf("##", StringComparison.Ordinal) != -1)
11 {
13 }
14 }
15 if (!Uri.TryCreate(s, UriKind.RelativeOrAbsolute, out Uri result))
16 {
18 }
19 return result;
20 }
21}
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlConvert_BadFormat
Definition SR.cs:370
Definition SR.cs:7
static bool TryCreate([NotNullWhen(true)] string? uriString, UriKind uriKind, [NotNullWhen(true)] out Uri? result)
Definition Uri.cs:3793
UriKind
Definition UriKind.cs:4