Available since: Gideros 2020.2
Removes data from the head or tail of a Buffer object. If amount is positive, data is removed from the beginning, otherwise data is removed from the end.
(number) = Buffer:trim(amount)
amount: (number) Amount of data to remove.
Returns (number) New buffer size.