Exemplo n.º 1
0
 public static ReadOnlyMemory <T> TrimEnd <T>(this ReadOnlyMemory <T> memory, T trimElement)
     where T : IEquatable <T>
 => memory.Slice(0, ClampEnd(memory.Span, 0, trimElement));
Exemplo n.º 2
0
 public static ReadOnlyMemory <char> TrimEnd(this ReadOnlyMemory <char> memory)
 => memory.Slice(0, ClampEnd(memory.Span, 0));
Exemplo n.º 3
0
 public static ReadOnlyMemory <T> TrimStart <T>(this ReadOnlyMemory <T> memory, T trimElement)
     where T : IEquatable <T>
 => memory.Slice(ClampStart(memory.Span, trimElement));
Exemplo n.º 4
0
 public static ReadOnlyMemory <char> TrimStart(this ReadOnlyMemory <char> memory)
 => memory.Slice(ClampStart(memory.Span));