← Back to index
|
Original Bugzilla link
Bug 10732 – Example code for std.utf.toUTFindex does not work
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-30T18:58:00Z
Last change time
2013-07-31T19:41:19Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2013-07-30T18:58:50Z
As the title. import std.utf; void main() { assert(toUTFindex(`hello world`, 7) == 7); // doesn't work! assert(toUTFindex(`hello world`w, 7) == 7); assert(toUTFindex(`hello world`d, 7) == 7); assert(toUTFindex(`Ma Chérie`, 6) == 7); // doesn't work! assert(toUTFindex(`Ma Chérie`w, 7) == 7); assert(toUTFindex(`Ma Chérie`d, 7) == 7); assert(toUTFindex(`さいごの果実 / ミツバチと科学者`, 3) == 9); // doesn't work! assert(toUTFindex(`さいごの果実 / ミツバチと科学者`w, 9) == 9); assert(toUTFindex(`さいごの果実 / ミツバチと科学者`d, 9) == 9); }
Comment #1
by k.hara.pg — 2013-07-30T19:13:37Z
https://github.com/D-Programming-Language/phobos/pull/1443
Comment #2
by github-bugzilla — 2013-07-31T17:15:44Z
Commit pushed to master at
https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/a5ee921f7d2f327e82316de05814ffebda89e201
fix Issue 10732 - Example code for std.utf.toUTFindex does not work