nfill
Description:
Creates a new string length
bytes long filled with fill_char
.
Example: Fill a string with n chars:
public static int main (string[] args) {
// Output: ``zzzzzzzzzz``
string str = string.nfill (10, 'z');
print ("%s\n", str);
return 0;
}
valac --pkg glib-2.0 string.nfill.vala
Parameters:
length |
the length of the new string |
fill_char |
the byte to fill the string with |
Returns:
a newly-allocated string filled with |