[Issue 9493] std.algorithm.canFind returns true for empty string in array of integers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 9 10:06:16 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=9493
Peter Alexander <peter.alexander.au at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peter.alexander.au at gmail.co
| |m
--- Comment #3 from Peter Alexander <peter.alexander.au at gmail.com> 2014-02-09 10:06:12 PST ---
int is comparable with dchar, so this is working as intended.
Note: you can also do this:
assert(canFind([1, 2, 3, 4], "\x02\x03")); // success
assert(canFind([1, 2, 3, 4], "\x02\x05")); // fail
Remember that the "needle" can be a range as well.
If there are no further issues, I'll resolve this as invalid.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list