Re: [Vala] Possible but in string.index_of, index_of_char and contains

2013-10-17 Thread Thomas Olson
On 10/16/2013 10:20 PM, Evan Nemerson wrote: On Thu, 2013-10-17 at 11:07 +0800, Nor Jaidi Tuah wrote: On Wed, 2013-10-16 at 19:45 -0700, Evan Nemerson wrote: On Thu, 2013-10-17 at 09:19 +0800, Nor Jaidi Tuah wrote: ABC.index_of_char('\x00'): 0 This looks like a bug. But why should you want

Re: [Vala] Possible but in string.index_of, index_of_char and contains

2013-10-16 Thread Evan Nemerson
On Thu, 2013-10-17 at 09:19 +0800, Nor Jaidi Tuah wrote: ABC.index_of_char('\x00'): 0 This looks like a bug. But why should you want to search for \x00 ? string.index_of_char is basically a wrapper around g_utf8_strchr. I guess g_utf8_strchr could return null if c==0, but it does feel a

Re: [Vala] Possible but in string.index_of, index_of_char and contains

2013-10-16 Thread Nor Jaidi Tuah
On Wed, 2013-10-16 at 19:45 -0700, Evan Nemerson wrote: On Thu, 2013-10-17 at 09:19 +0800, Nor Jaidi Tuah wrote: ABC.index_of_char('\x00'): 0 This looks like a bug. But why should you want to search for \x00 ? string.index_of_char is basically a wrapper around g_utf8_strchr. I guess

Re: [Vala] Possible but in string.index_of, index_of_char and contains

2013-10-16 Thread Evan Nemerson
On Thu, 2013-10-17 at 11:07 +0800, Nor Jaidi Tuah wrote: On Wed, 2013-10-16 at 19:45 -0700, Evan Nemerson wrote: On Thu, 2013-10-17 at 09:19 +0800, Nor Jaidi Tuah wrote: ABC.index_of_char('\x00'): 0 This looks like a bug. But why should you want to search for \x00 ?

[Vala] Possible but in string.index_of, index_of_char and contains

2013-10-15 Thread Thomas Olson
Hello, I was getting some false positives in a string that I was using for valid character lookups so I wrote a little test app to display what I was seeing. Below are the lines that were run as well as what the output of each of those lines. The first set of three lines looks correct, but