Re: Convert float to gchar *



iain <iain prettypeople org> wrote:

Wow, that is the greatest line of code I've ever seen.
But, what you want is g_strdup_printf.

Not really. snprintf () on an auto (local) buffer (instead of pointer)
variable is probably faster / more direct, uses less system resources
and you don't need to free anything by yourself, thus avoiding a
potential memory leak cause.



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