[Issue 3340] New: std.string.split(S1 s, S2 delim) still doesn't work for char[].

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 22 10:38:36 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3340

           Summary: std.string.split(S1 s, S2 delim) still doesn't work
                    for char[].
           Product: D
           Version: 2.032
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2009-09-22 10:38:35 PDT ---
The following line appears twice in the function:

words[wordi] = "";

Since "" is considered immutable, it can't be put in an array of char[]s.  This
can be fixed by changing this line to:

words[wordi] = null;

Null is equivalent, for all practical purposes, to "", but is automatically
coerced to the right type.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list