Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core::str: Implement Chars iterator using slice::Items
Re-use the vector iterator to implement the chars iterator. The iterator uses our guarantee that the string contains valid UTF-8, but its only unsafe code is transmuting the decoded u32 into char.
- Loading branch information
root
committed
Jul 17, 2014
1 parent
d6b42c2
commit 42357d7
Showing
1 changed file
with
114 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters