Pixel-Composer/scripts/SnapToXML/SnapToXML.gml

17 lines
435 B
Plaintext
Raw Normal View History

2024-06-06 09:54:13 +02:00
// Feather disable all
/// @return XML string that encodes the provided struct
///
/// @param struct The data to encode
///
/// @jujuadams 2022-10-30
function SnapToXML(_struct)
{
var _buffer = buffer_create(1024, buffer_grow, 1);
SnapBufferWriteXML(_buffer, _struct);
buffer_seek(_buffer, buffer_seek_start, 0);
var _string = buffer_read(_buffer, buffer_string);
buffer_delete(_buffer);
return _string;
}