[Issue 14910] Take!R does not offer length for char[]

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Aug 12 02:14:46 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14910

ZombineDev <petar.p.kirov at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |petar.p.kirov at gmail.com

--- Comment #1 from ZombineDev <petar.p.kirov at gmail.com> ---
See http://dlang.org/phobos/std_range_primitives#hasLength.
Take provides a length property only if for its argument hasLength return true.

If you know that you're only dealing with ASCII, you can cast the string to
ubyte[], see: http://dpaste.dzfl.pl/fe93a68a3945.

--


More information about the Digitalmars-d-bugs mailing list