www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14827] New: [REG 2.068] std.string.strip handles Unicode


          Issue ID: 14827
           Summary: [REG 2.068] std.string.strip handles Unicode
                    incorrectly with -O -inline
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: gassa mail.ru

import std.conv, std.range, std.stdio, std.string, std.uni;
void main () {
    string s = "Тест";
    writeln (s.front); // "T", right
    writeln (s.front.isWhite); // false, right
    writeln (s.strip); // "Тест" expected, "ест" found

2.067.1: OK
2.068.0-b1 and 2.068.0-b2, compiled with "dmd -O -inline -m32": s.strip eats
the first Cyrillic letter.  On the other hand, "-m64" version works fine.

Jul 25 2015