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

◆ ClampStart< T >() [2/2]

static int System.MemoryExtensions.ClampStart< T > ( ReadOnlySpan< T > span,
T trimElement )
inlinestaticprivate
Type Constraints
T :IEquatable<T> 

Definition at line 1711 of file MemoryExtensions.cs.

1712 {
1713 int i = 0;
1714 if (trimElement != null)
1715 {
1716 for (; i < span.Length && trimElement.Equals(span[i]); i++)
1717 {
1718 }
1719 }
1720 else
1721 {
1722 for (; i < span.Length && span[i] == null; i++)
1723 {
1724 }
1725 }
1726 return i;
1727 }

Referenced by System.MemoryExtensions.Trim< T >(), and System.MemoryExtensions.Trim< T >().