prepend_len
Description:
Prepends len bytes of val to this.
If len is positive, val may contain embedded nuls and need not be nul-terminated. It is the caller's responsibility
to ensure that val has at least len addressable bytes.
If len is negative, val must be nul-terminated and len is considered to request the entire string
length. This makes prepend_len equivalent to
prepend.
Example: Prepend n bytes of a string:
public static int main (string[] args) {
// Output: ``hello, world!``
StringBuilder builder = new StringBuilder (", world!\n");
builder.prepend_len ("hello, world!", 5);
print (builder.str);
return 0;
}
valac --pkg glib-2.0 GLib.StringBuilder.prepend_len.vala
Parameters:
| this | |
| val |
bytes to prepend |
| len |
number of bytes in |
Returns:
|
this |