public int ForEachByteDesc(IByteProcessor visitor) { var thisLength = this.length; if (0u >= (uint)thisLength) { return(IndexNotFound); } return(SpanHelpers.ForEachByteDesc(ref this.value[this.offset], visitor, thisLength)); }
public int ForEachByteDesc(int index, int count, IByteProcessor visitor) { var thisLength = this.length; if (0u >= (uint)thisLength) { return(IndexNotFound); } if (MathUtil.IsOutOfBounds(index, count, thisLength)) { ThrowIndexOutOfRangeException_Index(index, count, thisLength); } var idx = SpanHelpers.ForEachByteDesc(ref this.value[this.offset + index], visitor, count); if ((uint)count > (uint)idx) { return(index + idx); } return(IndexNotFound); }