D-Programming-Language/phobos — pull request #2043 by WalterBright (2014-03-23 22:19:50+00:00)
Title: add byCodeunit, byChar, byWchar and byDchar to std.utf

These should form the foundation for higher performance string processing, as they:

1. do not auto-decode
2. are pure/nothrow/safe, depending on the input parameter
3. are lazy
4. do not allocate memory
5. replace invalid UTF sequences with U+FFFD, per the Unicode Standard 6.2, rather than throwing or asserting
6. are composable - completely compatible with ranges and algorithms

Unit tests are at 100%.