Bug or intentional (glib)
- From: Dietmar Kling <dietmar kling sam-net de>
- To: gtk-list redhat com
- Subject: Bug or intentional (glib)
- Date: Thu, 01 Jun 2000 12:27:36 +0200
Hello,
I recently used glib for programming in C.
(glib 1.2.8)
Great.
But I have a question concerning g_strsplit
Is it intentional that g_strsplit's parameter
has another semantic than the "never use"
strtok ?
What I mean
When I split a string with strtok, i can
put a space and a tab in the delim string
and strtok splits the string:
"\t bla\t\t blub "
into the strings "bla" and "blub"
However g_strsplit interprets IMHO
the delimiter wrong (I've looked into the
source). When i give a "\t " as delim string
it looks after "\t " in the string
so the example string above would look
like
"bla\t"
"blub "
after split.
if this is intentional i would recommend to
rename the delim parameter to "separator"
to avoid confusion with strtok
Regards
Dietmar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]