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

◆ JoinCore< T >()

static string System.String.JoinCore< T > ( ReadOnlySpan< char > separator,
IEnumerable< T > values )
inlinestaticprivate

Definition at line 2121 of file String.cs.

2122 {
2123 if (typeof(T) == typeof(string))
2124 {
2126 {
2127 return JoinCore(separator, CollectionsMarshal.AsSpan(list));
2128 }
2129 if (values is string[] array)
2130 {
2132 }
2133 }
2134 if (values == null)
2135 {
2136 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.values);
2137 }
2139 if (!enumerator.MoveNext())
2140 {
2141 return Empty;
2142 }
2143 string text = enumerator.Current?.ToString();
2144 if (!enumerator.MoveNext())
2145 {
2146 return text ?? Empty;
2147 }
2150 valueStringBuilder.Append(text);
2151 do
2152 {
2153 T current = enumerator.Current;
2155 if (current != null)
2156 {
2157 valueStringBuilder.Append(current.ToString());
2158 }
2159 }
2160 while (enumerator.MoveNext());
2161 return valueStringBuilder.ToString();
2162 }
static string JoinCore(ReadOnlySpan< char > separator, string[] value, int startIndex, int count)
Definition String.cs:2014
static readonly string Empty
Definition String.cs:29

References System.array, System.String.Empty, System.Collections.Generic.Dictionary< TKey, TValue >.GetEnumerator(), System.String.JoinCore(), System.list, System.text, System.ThrowHelper.ThrowArgumentNullException(), and System.values.