StringBuffer:size()
Return the size of the StringBuffer. This is the amount of memory currently consumed by the StringBuffer. The size is automatically increased as necessary when strings are appended to the end of the StringBuffer. Note that StringBuffer:clear() does not decrease the size of the StringBuffer, it only sets the length to 0.
Example
bytes = sb:size()