g_strdup_strftime
- From: Darin Adler <darin eazel com>
- To: Gtk Developers <gtk-devel-list redhat com>
- CC: John Sullivan <sullivan eazel com>
- Subject: g_strdup_strftime
- Date: Wed, 26 Jan 2000 10:22:17 -0800
I'd like to see a function named g_strdup_strftime added to <glib.h>. With
glibc, it's trivial to implement:
gchar *
g_strdup_strftime (const gchar *format, const struct tm *time)
{
size_t size;
gchar *result;
size = strftime (NULL, UINT_MAX, format, time);
result = g_malloc (size + 1);
strftime (result, size + 1, format, time);
return result;
}
But it might be trickier to do with non-Gnu versions of strftime.
What do you all think?
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]