Usage of g_str_strip
- From: Sankar P <psankar novell com>
- To: gtk-app-devel-list gnome org
- Subject: Usage of g_str_strip
- Date: Mon, 17 Oct 2005 14:11:54 +0530
Hey all,
There is a function g_strstrip defined to strip-off the leading and
trailing spaces from a string. However, the working of this function is
a bit confusing.
I have the following code-snippet :
name = g_strstrip ( g_strdup (gtk_entry_get_text(GTK_ENTRY
(name_entry))));
g_free (name);
Is this leaking memory? I dont understand clearly how g_strstrip works.
Do I need to store the g_strdup in a pointer and free it instead of the
name? The Devhelp doesnt clearly specify anything about it.
Please clarify.
Thanks,
Sankar P
P.S. Since I am not subscribed to this list. Include my address in your
reply.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]