mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
added g_strndup
-Yosh
This commit is contained in:
parent
e1f0fb0c1e
commit
47074edbbd
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Aug 18 18:23:09 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib.h
|
||||
* gstrfuncs.c: added g_strndup
|
||||
|
||||
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h:
|
||||
|
2
glib.h
2
glib.h
@ -1106,6 +1106,8 @@ void g_strdelimit (gchar *string,
|
||||
const gchar *delimiters,
|
||||
gchar new_delimiter);
|
||||
gchar* g_strdup (const gchar *str);
|
||||
gchar* g_strndup (const gchar *str,
|
||||
gulong n);
|
||||
gchar* g_strconcat (const gchar *string1,
|
||||
...); /* NULL terminated */
|
||||
gdouble g_strtod (const gchar *nptr,
|
||||
|
@ -1106,6 +1106,8 @@ void g_strdelimit (gchar *string,
|
||||
const gchar *delimiters,
|
||||
gchar new_delimiter);
|
||||
gchar* g_strdup (const gchar *str);
|
||||
gchar* g_strndup (const gchar *str,
|
||||
gulong n);
|
||||
gchar* g_strconcat (const gchar *string1,
|
||||
...); /* NULL terminated */
|
||||
gdouble g_strtod (const gchar *nptr,
|
||||
|
@ -42,6 +42,22 @@ g_strdup (const gchar *str)
|
||||
return new_str;
|
||||
}
|
||||
|
||||
gchar*
|
||||
g_strndup (const gchar *str, gulong n)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
new_str = NULL;
|
||||
if (str)
|
||||
{
|
||||
new_str = g_new (char, n + 1);
|
||||
strncpy (new_str, str, n);
|
||||
new_str[n] = '\0';
|
||||
}
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
gchar*
|
||||
g_strconcat (const gchar *string1, ...)
|
||||
{
|
||||
|
16
gstrfuncs.c
16
gstrfuncs.c
@ -42,6 +42,22 @@ g_strdup (const gchar *str)
|
||||
return new_str;
|
||||
}
|
||||
|
||||
gchar*
|
||||
g_strndup (const gchar *str, gulong n)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
new_str = NULL;
|
||||
if (str)
|
||||
{
|
||||
new_str = g_new (char, n + 1);
|
||||
strncpy (new_str, str, n);
|
||||
new_str[n] = '\0';
|
||||
}
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
gchar*
|
||||
g_strconcat (const gchar *string1, ...)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user