www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10088] New: std.range.chunks of string too

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10088

           Summary: std.range.chunks of string too
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.stdio: writeln;
import std.range: chunks;
void main() {
    writeln(chunks("abcd", 2));
}


Output:

...\dmd2\windows\bin\..\..\src\phobos\std\range.d(6520): Error: template
instance Chunks!(string) does not match template declaration Chunks(Source) if
(isInputRange!(Source) && hasSlicing!(Source) && hasLength!(Source))
test.d(4): Error: template instance std.range.chunks!(string) error
instantiating


Expected:

["ab", "cd"]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 15 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10088




Apparently in my code most needs of chunks() involve ASCII (or UTF-8) strings.

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