[Vala] Possible but in string.index_of, index_of_char and contains
- From: Thomas Olson <tolson stratagium net>
- To: vala-list gnome org
- Subject: [Vala] Possible but in string.index_of, index_of_char and contains
- Date: Tue, 15 Oct 2013 21:53:53 -0500
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 the last set of three lines is not what I expected. Is
this designed behavior?
"ABC".index_of_char('A'): 0
"ABC".index_of_char('B'): 1
"ABC".index_of_char('C'): 2
"ABC".index_of_char('\x00'): 0
"ABC".index_of("\x00"): 0
"ABC".contains("\x00"): true
Kind Regards,
Tom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]