insert


Description:

public unowned StringBuilder insert (ssize_t pos, string val)

Inserts a copy of a string into a StringBuilder, expanding it if necessary.

Example: Insert:

public static int main (string[] args) {
// Output: ``hello, world!``
StringBuilder builder = new StringBuilder ("helloworld");
builder.insert (5, ", ");
builder.insert (12, "!\n");
print (builder.str);
return 0;
}

valac --pkg glib-2.0 GLib.StringBuilder.insert.vala

Parameters:

this

a StringBuilder

pos

the position to insert the copy of the string

val

the string to insert

Returns:

this