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

◆ Substring() [2/2]

static string System.Xml.Xsl.Runtime.XsltFunctions.Substring ( string value,
double startIndex,
double length )
inlinestatic

Definition at line 71 of file XsltFunctions.cs.

72 {
74 if (startIndex >= (double)value.Length)
75 {
76 return string.Empty;
77 }
78 double num = startIndex + Round(length);
79 startIndex = ((startIndex <= 0.0) ? 0.0 : startIndex);
80 if (startIndex < num)
81 {
82 if (num > (double)value.Length)
83 {
84 num = value.Length;
85 }
86 return value.Substring((int)startIndex, (int)(num - startIndex));
87 }
88 return string.Empty;
89 }
static double Round(double value)

References System.length, System.Xml.Xsl.Runtime.XsltFunctions.Round(), System.startIndex, and System.value.