rust-lang/rust — pull request #15619 by kwantam (2014-07-11 22:19:38+00:00)
Title: UnicodeStrSlice: add width() and graphemes() methods

- `width()` computes the displayed width of a string, ignoring the width of control characters.
- arguably we might do *something* else for control characters, but the question is, what?
- users who want to do something else can iterate over chars()

- `graphemes()` returns a `Graphemes` struct, which implements an iterator over the grapheme clusters of a &str.
- fully compliant with [UAX#29](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)
- passes all [Unicode-supplied tests](http://www.unicode.org/reports/tr41/tr41-15.html#Tests29)

- added code to generate additionial categories to `unicode.py`
- `Cn` aka `Not_Assigned`
- categories necessary for grapheme cluster breaking

closes #7043