写空数据

@param {number} length 长度
@param {number=} offset 起始偏移
@return {this}
189668
function (length, offset) {

                if (length < 0) {
                    error.raise(10002, this.length, length);
                }

                if (undefined === offset) {
                    offset = this.offset;
                }

                var littleEndian = this.littleEndian;
                for (var i = 0; i < length; ++i) {
                    this.view.setUint8(offset + i, 0, littleEndian);
                }

                this.offset = offset + length;

                return this;
            }
128171
function (offset) {
                if (undefined === offset) {
                    this.offset = 0;
                }

                if (offset < 0 || offset > this.length) {
                    error.raise(10002, this.length, offset);
                }

                this._offset = this.offset;
                this.offset = offset;

                return this;
            }
923851
function(length) {
			var out = [];
			while (this.length > length) {
				out.push(this.pop());
			}
			if (out.length) {
				onchange(this, this.length - 1, out);
			}
		}
551596
function normalizeLength(token, length) {
	length = length || 6;
	if (token.length < length) {
		token += (new Array(length - token.length + 1)).join('0');
	}
    return token.slice(0, length);
}
328073
function (len) {
            var result = '';
            if (len) {
                result = this.source.substr(this.position, len);
            } else {
                result = this.source.substr(this.position);
            }
            return result;
        }
708511
function (buffer, start, length) {
  /*jshint bitwise:false*/

  var isNested = buffer instanceof ByteBuffer;

  this.buffer = isNested ? buffer.buffer : buffer;
  this.start = (start || 0) + (isNested ? buffer.start : 0);
  this.length = length || (this.buffer.length - this.start);
  this.offset = 0;

}
1003506
function(offset) {
			offset = offset || 0
			var year = this.year

			var monthNum = this.month
			monthNum += offset
			if(monthNum < 0) { year-- }
			if(monthNum > 11) { year++ }
			
			return year
		}
680178
public function cut(int $offset, ?int $length = null): self
    {
        if (null === $length) {
            $length = PHP_INT_MAX;
        }
        if ($offset < 0) {
            $offset = $this->count() + $offset;
        }

        return $this->prune(
            function ($value, $key, $index) use ($offset, $length) {
                return ($index >= $offset) && ($index < $offset + $length);
            }
        );
    }
301177
function limitBy (arr, n, offset) {
  offset = offset ? parseInt(offset, 10) : 0
  n = util.toNumber(n)
  return typeof n === 'number'
    ? arr.slice(offset, offset + n)
    : arr
}
1221667
public void setLength(int length) {
		if (length < 0 || body.length == length) {
			return;
		}

		int oldPos = pos;
		pos = Math.min(pos, length);

		byte[] newBody = new byte[length];
		System.arraycopy(body, 0, newBody, 0, pos);
		body = newBody;
		
		if (oldPos > pos) {
			cachedString = null;
		}
	}
274177
protected int checkWrite(int offset, int length) {
    checkOffset(offset);
    int position = offset + length;
    if (position > size()) {
      throw new BufferOverflowException();
    }
    return position;
  }
31394
function (node, offset) {
      if (typeof offset === 'undefined') {
        offset = node.nodeType === 3 ? node.length : node.childNodes.length;
      }

      while (node && node.hasChildNodes()) {
        node = node.childNodes[offset];
        if (node) {
          offset = node.nodeType === 3 ? node.length : node.childNodes.length;
        }
      }
      return { node: node, offset: offset };
    }
572893
public WrappedByteBuffer put(byte[] v, int offset, int length) {
        _autoExpand(length);
        for (int i = 0; i < length; i++) {
            _buf.put(v[offset + i]);
        }
        return this;
    }
1143698
public Slice slice(int index, int length)
    {
        if (index == 0 && length == this.length) {
            return this;
        }

        checkPositionIndexes(index, index + length, this.length);
        if (index >= 0 && length == 0) {
            return Slices.EMPTY_SLICE;
        }
        return new Slice(data, offset + index, length);
    }
1365105
public static <E> Page<E> offsetPage(int offset, int limit, boolean count) {
        Page<E> page = new Page<E>(new int[]{offset, limit}, count);
        //当已经执行过orderBy的时候
        Page<E> oldPage = getLocalPage();
        if (oldPage != null && oldPage.isOrderByOnly()) {
            page.setOrderBy(oldPage.getOrderBy());
        }
        setLocalPage(page);
        return page;
    }
553791
function write(type, value, offset, littleEndian) {

            // 使用当前位移
            if (undefined === offset) {
                offset = this.offset;
            }

            // 使用小尾
            if (undefined === littleEndian) {
                littleEndian = this.littleEndian;
            }

            // 扩展方法
            if (undefined === dataType[type]) {
                return this['write' + type](value, offset, littleEndian);
            }

            var size = dataType[type];
            this.offset = offset + size;
            this.view['set' + type](offset, value, littleEndian);
            return this;
        }
1089669
function pad(value, length) {
  value = String(value);
  length = length || 2;

  while (value.length < length) {
    value = '0' + value;
  }

  return value;
}