On Friday, 3 October 2014 at 21:17:54 UTC, monarch_dodra wrote:
Sounds about right, but I didn't really look.

std.utf.stride solved all but one thing...namely that

https://github.com/nordlow/justd/blob/master/range_ex.d#L131

prints all but last

Tuple!(string, string)("", "Nordlöw")
Tuple!(string, string)("N", "ordlöw")
Tuple!(string, string)("No", "rdlöw")
Tuple!(string, string)("Nor", "dlöw")
Tuple!(string, string)("Nord", "löw")
Tuple!(string, string)("Nordl", "öw")
Tuple!(string, string)("Nordlö", "w")

I'm guessing empty() is the problem but changing

    _data.length == _index

to

    _data.length < _index

instead leads to infinite iteration

Tuple!(string, string)("", "Nordlöw")
Tuple!(string, string)("N", "ordlöw")
Tuple!(string, string)("No", "rdlöw")
Tuple!(string, string)("Nor", "dlöw")
Tuple!(string, string)("Nord", "löw")
Tuple!(string, string)("Nordl", "öw")
Tuple!(string, string)("Nordlö", "w")
Tuple!(string, string)("Nordlöw", "")
Tuple!(string, string)("Nordlöw", "")
Tuple!(string, string)("Nordlöw", "")
Tuple!(string, string)("Nordlöw", "")
Tuple!(string, string)("Nordlöw", "")
Tuple!(string, string)("Nordlöw", "")

...

Why?

Reply via email to