close
sprintf - C++ Reference

但今天要介紹的是

g_sprintf
以及 g_strdup_printf


g_sprintf ()
gint g_sprintf(gchar *string, gchar const *format, ...);


An implementation of the standard sprintf() function which supports positional parameters, as specified in the Single Unix Specification.

g_strdup_printf ()
gchar* g_strdup_printf (const gchar *format ...);


Similar to the standard C sprintf() function but safer, since it calculates the maximum space required and allocates memory to hold the result. The returned string should be freed when no longer needed.
arrow
arrow
    全站熱搜

    tttt 發表在 痞客邦 留言(0) 人氣()