Gtk.Builder.prototype.add_from_string

function add_from_string(buffer:String, length:gsize):Number {
    // Gjs wrapper for gtk_builder_add_from_string()
}

Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder UI definition</link> and merges it with the current contents of builder.

Upon errors 0 will be returned and @error will be assigned a GLib.Error from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.

Since 2.12

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