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

◆ ToString()

override string System.Memory< T >.ToString ( )
inline

Definition at line 180 of file Memory.cs.

181 {
182 if (typeof(T) == typeof(char))
183 {
184 if (!(_object is string text))
185 {
186 return Span.ToString();
187 }
188 return text.Substring(_index, _length);
189 }
190 return $"System.Memory<{typeof(T).Name}>[{_length}]";
191 }
readonly int _length
Definition Memory.cs:19
unsafe Span< T > Span
Definition Memory.cs:28
readonly object _object
Definition Memory.cs:15
readonly int _index
Definition Memory.cs:17

References System.Memory< T >._index, System.Memory< T >._length, System.Memory< T >._object, System.text, and System.Span< T >.ToString().