May 15, 2007 [Issue 1233] New: std.string.ifind(char[] s, char[] sub) fails on certain non ascii strings | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1233 Summary: std.string.ifind(char[] s, char[] sub) fails on certain non ascii strings Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: patch Severity: trivial Priority: P2 Component: Phobos AssignedTo: bugzilla@digitalmars.com ReportedBy: d@chqrlie.org import std.string; int main(char[][] args) { printf("ifind(\"é\", \"é\") -> %d\n", ifind("é", "é")); return 0; } produces incorrect output : ifind("é", "é") -> -1 bug is in src/phobos/std/string.d, line 613: - size_t imax = s.length - sublength; + size_t imax = s.length - sublength + 1; This will fix the bug, but the implementation will remain quite inefficient. -- |
July 01, 2007 [Issue 1233] std.string.ifind(char[] s, char[] sub) fails on certain non ascii strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1233 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2007-07-01 14:02 ------- Fixed DMD 1.018 and DMD 2.002 -- |
Copyright © 1999-2021 by the D Language Foundation