Clears the buffer

var b = new Buffer
b.append "hello"
assert not b.is_empty
b.clear
assert b.is_empty

Property definitions

core $ Buffer :: clear
	# Clears the buffer
	#
	# ~~~
	# var b = new Buffer
	# b.append "hello"
	# assert not b.is_empty
	# b.clear
	# assert b.is_empty
	# ~~~
	fun clear is abstract
lib/core/text/abstract_text.nit:1565,2--1574,22

core $ FlatBuffer :: clear
	redef fun clear do
		_byte_length = 0
		_length = 0
		if written then
			_capacity = 16
			reset
		end
	end
lib/core/text/flat.nit:980,2--987,4