mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Add a function to calculate the length of a NULL-terminated string array.
Thu Sep 9 00:10:40 2004 Matthias Clasen <maclas@gmx.de> * glib/gstrfuncs.h: * glib/gstrfuncs.c (g_strv_length): Add a function to calculate the length of a NULL-terminated string array. (#150455, Tim-Philipp Müller) * tests/strfunc-test.c (main): Add a test for g_strv_length().
This commit is contained in:
committed by
Matthias Clasen
parent
cbadee0812
commit
6ec4724399
@@ -551,5 +551,7 @@ main (int argc,
|
||||
TEST (NULL, 9 == g_snprintf (buf, 5, "%s", "abcdefghi"));
|
||||
}
|
||||
|
||||
TEST (NULL, g_strv_length (g_strsplit ("1,2,3,4", ",", -1)) == 4);
|
||||
|
||||
return any_failed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user