Copy of self starting at from

var b = "abcd".to_bytes
assert b.slice_from(1).hexdigest  == "626364"
assert b.slice_from(-1).hexdigest == "61626364"
assert b.slice_from(2).hexdigest  == "6364"

Property definitions

core $ Bytes :: slice_from
	# Copy of `self` starting at `from`
	#
	#     var b = "abcd".to_bytes
	#     assert b.slice_from(1).hexdigest  == "626364"
	#     assert b.slice_from(-1).hexdigest == "61626364"
	#     assert b.slice_from(2).hexdigest  == "6364"
	fun slice_from(from: Int): Bytes do
		if from >= length then return new Bytes.empty
		if from < 0 then from = 0
		return slice(from, length)
	end
lib/core/bytes.nit:335,2--345,4