add_from_string


Description:

[ Version ( since = "2.12" ) ]
public uint add_from_string (string buffer, size_t length) throws Error

Parses a string containing a GtkBuilder UI definition and merges it with the current contents of this.

Most users will probably want to use Builder.from_string.

Upon errors 0 will be returned and throws will be assigned a Error from the BuilderError , MarkupError or VariantParseError domain.

It’s not really reasonable to attempt to handle failures of this call. The only reasonable thing to do when an error is detected is to call error.

Parameters:

this

a Builder

buffer

the string to parse

length

the length of buffer (may be -1 if buffer is nul-terminated)

Returns:

A positive value on success, 0 if an error occurred