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

◆ Concat() [12/12]

static string System.String.Concat ( string? str0,
string? str1,
string? str2,
string? str3 )
inlinestatic

Definition at line 1757 of file String.cs.

1758 {
1759 if (IsNullOrEmpty(str0))
1760 {
1761 return str1 + str2 + str3;
1762 }
1763 if (IsNullOrEmpty(str1))
1764 {
1765 return str0 + str2 + str3;
1766 }
1767 if (IsNullOrEmpty(str2))
1768 {
1769 return str0 + str1 + str3;
1770 }
1771 if (IsNullOrEmpty(str3))
1772 {
1773 return str0 + str1 + str2;
1774 }
1775 int length = str0.Length + str1.Length + str2.Length + str3.Length;
1776 string text = FastAllocateString(length);
1778 FillStringChecked(text, str0.Length, str1);
1779 FillStringChecked(text, str0.Length + str1.Length, str2);
1780 FillStringChecked(text, str0.Length + str1.Length + str2.Length, str3);
1781 return text;
1782 }
static void FillStringChecked(string dest, int destPos, string src)
Definition String.cs:1560
static string FastAllocateString(int length)
static bool IsNullOrEmpty([NotNullWhen(false)] string? value)
Definition String.cs:1319

References System.String.FastAllocateString(), System.String.FillStringChecked(), System.String.IsNullOrEmpty(), System.length, and System.text.