prepend_c


Description:

public unowned StringBuilder prepend_c (char c)

Adds a byte onto the start of a StringBuilder, expanding it if necessary.

Example: Prepend a char:

public static int main (string[] args) {
// Output: ``hello, world!``
StringBuilder builder = new StringBuilder (", world!\n");
builder.prepend_c ('o').prepend_c ('l').prepend_c ('l').prepend_c ('e').prepend_c ('h');
print (builder.str);
return 0;
}

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

Parameters:

this

a StringBuilder

c

the byte to prepend on the start of the StringBuilder

Returns:

this