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

◆ TrimEnd< T >() [3/8]

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

Definition at line 1820 of file MemoryExtensions.cs.

1821 {
1822 if (trimElements.Length > 1)
1823 {
1824 return memory.Slice(0, ClampEnd(memory.Span, 0, trimElements));
1825 }
1826 if (trimElements.Length == 1)
1827 {
1828 return memory.TrimEnd(trimElements[0]);
1829 }
1830 return memory;
1831 }
static int ClampEnd(ReadOnlySpan< char > span, int start)

References System.MemoryExtensions.ClampEnd().