public int ForEachByteDesc(int index, int length, ByteProcessor processor) => this.Buf.ForEachByteDesc(processor);
public int ForEachByteDesc(int index, int length, ByteProcessor processor) { this.CheckIndex(index, length); return -1; }
public int ForEachByteDesc(ByteProcessor processor) => this.Buf.ForEachByteDesc(processor);
public int ForEachByte(int index, int length, ByteProcessor processor) => this.buf.ForEachByte(index, length, processor);
public int ForEachByteDesc(ByteProcessor processor) => -1;
public int ForEachByte(ByteProcessor processor) => this.buf.ForEachByte(processor);
int ForEachByteDesc0(int index, int length, ByteProcessor processor) { if (processor == null) { throw new NullReferenceException("processor"); } if (length == 0) { return -1; } int i = index + length - 1; do { if (processor.Process(this._GetByte(i))) { i--; } else { return i; } } while (i >= index); return -1; }
public int ForEachByteDesc(ByteProcessor processor) { int index = this.ReaderIndex; int length = this.WriterIndex - index; this.EnsureAccessible(); return this.ForEachByteDesc0(index, length, processor); }
int ForEachByteAsc0(int index, int length, ByteProcessor processor) { if (processor == null) { throw new ArgumentNullException(nameof(processor)); } if (length == 0) { return -1; } int endIndex = index + length; int i = index; do { if (processor.Process(this._GetByte(i))) { i++; } else { return i; } } while (i < endIndex); return -1; }
public int ForEachByte(int index, int length, ByteProcessor processor) { this.CheckIndex(index, length); return this.ForEachByteAsc0(index, length, processor); }