[Vala] Formatting printf output



When converting C code to Vala there are a lot of times I want to convert
printf formatting. It doesn't appear to just cleanly convert though.

This C for example:

sprintf(str, "@b%s", "Name");

sprintf(str,"Example number: %.3f", 31.30233);

When try just passing the equivalent formatting to vala I just @ signs
beside my strings and "3f"s littered throughout my code. Any one have any
experience with this?

Steven N. Oliver


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]