Re: byCodePoint for a range of chars

2014-05-20 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 20 May 2014 at 19:58:17 UTC, monarch_dodra wrote: On Tuesday, 20 May 2014 at 17:59:09 UTC, John Colvin wrote: Given a range with element type char, what's the best way of iterating over it by code-point, without filling an array first? Related to this: What's the status of std.utf

Re: byCodePoint for a range of chars

2014-05-20 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 20 May 2014 at 18:06:09 UTC, Justin Whear wrote: Foreach on narrow strings automatically decodes, so it's as simple as: // assume UTF-8 encoded char[] myData = ... foreach (dchar codePoint; myData) ... I think the point of his question is if you have an actual non-array range

Re: byCodePoint for a range of chars

2014-05-20 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 20 May 2014 at 17:59:09 UTC, John Colvin wrote: Given a range with element type char, what's the best way of iterating over it by code-point, without filling an array first? Related to this: What's the status of std.utf and std.encoding? The comments in std.encoding say that some f

Re: byCodePoint for a range of chars

2014-05-20 Thread Justin Whear via Digitalmars-d-learn
On Tue, 20 May 2014 17:59:07 +, John Colvin wrote: > Given a range with element type char, what's the best way of iterating > over it by code-point, without filling an array first? > > Related to this: What's the status of std.utf and std.encoding? The > comments in std.encoding say that some