set_text


Description:

public bool set_text (string str, ssize_t length)

Sets str as the plain text payload of this, converting it to UTF-8 if needed.

If length is -1, the length of the string will be used. Use get_text to retrieve the text.

Parameters:

this

a MessageData

str

plain text to be set as payload

length

length of the text, or -1

Returns:

true if the text was successfully converted to UTF-8