Re: glib strlen ?



On Tue, 25 Mar 2003 15:29:56 +0700
mige <mige_harimurti yahoo com> wrote:

How can I get the lenght of the string ? Or at least I need to test the 
string is empty or not.

if that string is a gchar * use this:

gchar *str;
if (str && str[0] != '\0') {
        /* the string is not empty */
}

regards,
        Olivier



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