free_to_bytes
Description:
Transfers ownership of the contents of this to a newly allocated Bytes.
The StringBuilder structure itself is deallocated, and it is therefore invalid to use this after invoking this function.
Note that while StringBuilder ensures that its buffer always has a trailing nul character (not reflected in its "len"), the returned Bytes does not include this extra nul; i.e. it has length exactly equal to the "len" member.
Parameters:
string |
Returns:
A newly allocated Bytes containing contents of this ; this itself is freed |