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

◆ Trim< T >() [1/8]

static Memory< T > System.MemoryExtensions.Trim< T > ( this Memory< T > memory,
ReadOnlySpan< T > trimElements )
inlinestatic
Type Constraints
T :IEquatable<T> 

Definition at line 1749 of file MemoryExtensions.cs.

1750 {
1751 if (trimElements.Length > 1)
1752 {
1756 return memory.Slice(start, length);
1757 }
1758 if (trimElements.Length == 1)
1759 {
1760 return memory.Trim(trimElements[0]);
1761 }
1762 return memory;
1763 }
static int ClampEnd< T >(ReadOnlySpan< T > span, int start, T trimElement)
static int ClampStart< T >(ReadOnlySpan< T > span, T trimElement)

References System.MemoryExtensions.ClampEnd< T >(), System.MemoryExtensions.ClampStart< T >(), System.length, and System.start.