Difference between revisions of "love.data.encode"

(Created page with "{{newin|0.11.0|110|type=function}} Encode Data or a string to a Data or string in one of the EncodeFormats. == Function == === Synopsis === <source lan...")
(No difference)

Revision as of 15:17, 7 January 2018

Available since LÖVE 0.11.0
This function is not supported in earlier versions.


Encode Data or a string to a Data or string in one of the EncodeFormats.

Function

Synopsis

encoded = love.data.encode( container, format, sourceString, linelength )

Arguments

ContainerType container
What type to return the encoded data as.
EncodeFormat format
The format of the output data.
string sourceString
The raw data to encode.
number linelength (0)
The maximum line length of the output. Only supported for base64, ignored if 0.

Returns

value encoded
ByteData/string which contains the encoded version of source.

Function

Synopsis

encoded = love.data.encode( container, format, sourceData, linelength )

Arguments

ContainerType container
What type to return the encoded data as.
EncodeFormat format
The format of the output data.
Data sourceData
The raw data to encode.
number linelength (0)
The maximum line length of the output. Only supported for base64, ignored if 0.

Returns

value encoded
ByteData/string which contains the encoded version of source.

See Also

Other Languages