Vocabulary
alien.data

Inputs and outputs
stringa string
encodingan encoding descriptor
aliena c-ptr


Word description
Encodes a string together with a trailing null code point using the given encoding, and stores the resulting bytes in a freshly-allocated unmanaged memory block.

Warning
Don't forget to deallocate the memory with a call to free.


Errors
Throws an error if one of the following conditions occurs:
the string contains null code points
the string contains characters not representable using the encoding specified
memory allocation fails


See also
string>alien, alien>string

Definition