예제 #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));
예제 #2
0
 public static ReadOnlyMemory <char> TrimEnd(this ReadOnlyMemory <char> memory)
 => memory.Slice(0, ClampEnd(memory.Span, 0));
예제 #3
0
 public static ReadOnlyMemory <T> TrimStart <T>(this ReadOnlyMemory <T> memory, T trimElement)
     where T : IEquatable <T>
 => memory.Slice(ClampStart(memory.Span, trimElement));
예제 #4
0
 public static ReadOnlyMemory <char> TrimStart(this ReadOnlyMemory <char> memory)
 => memory.Slice(ClampStart(memory.Span));