Trims trailing and preceding white spaces

assert "  Hello  World !  ".trim   == "Hello  World !"
assert "\na\nb\tc\t".trim          == "a\nb\tc"

Char::is_whitespace determines what is a whitespace.

Property definitions

core $ Text :: trim
	# Trims trailing and preceding white spaces
	#
	# ~~~
	# assert "  Hello  World !  ".trim   == "Hello  World !"
	# assert "\na\nb\tc\t".trim          == "a\nb\tc"
	# ~~~
	#
	# `Char::is_whitespace` determines what is a whitespace.
	fun trim: SELFTYPE do return (self.l_trim).r_trim
lib/core/text/abstract_text.nit:495,2--503,50