Buffer:trim

From GiderosMobile
Revision as of 14:26, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2020.2
Class: Buffer

Description

Removes data from the head or tail of a Buffer object. <syntaxhighlight lang="lua"> (number) = Buffer:trim(amount) </source> If amount is positive, data is removed from the beginning, otherwise data is removed from the end.

Parameters

amount: (number) amount of data to remove

Return values

Returns (number) new buffer size