diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2015-06-24 22:14:27 -0700 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2015-06-24 22:16:25 -0700 |
| commit | 32b7b50bafd0d40fda1caa93cf7f7068cc5052e3 (patch) | |
| tree | cf7fb8cc91a860349c97aa54538e604b44d8b152 /src/etc | |
| parent | 23958d803e18de20564c198e1d1ec8d030d617ce (diff) | |
Remove char::to_titlecase. Fix #26555
I added it because it was easy (same a `char::to_lowercase`, just a different table), but it doesn’t make sense to have this in std but not str::to_titlecase, which would require https://github.com/unicode-rs/unicode-segmentation At some point in the future this feature will be available (both on char and str) in a crates.io crate.
Diffstat (limited to 'src/etc')
| -rwxr-xr-x | src/etc/unicode.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/etc/unicode.py b/src/etc/unicode.py index f580127cdda..a740e837fdd 100755 --- a/src/etc/unicode.py +++ b/src/etc/unicode.py @@ -372,13 +372,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title): } } - pub fn to_title(c: char) -> [char; 3] { - match bsearch_case_table(c, to_titlecase_table) { - None => [c, '\\0', '\\0'], - Some(index) => to_titlecase_table[index].1 - } - } - fn bsearch_case_table(c: char, table: &'static [(char, [char; 3])]) -> Option<usize> { match table.binary_search_by(|&(key, _)| { if c == key { Equal } @@ -400,9 +393,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title): emit_table(f, "to_uppercase_table", sorted(to_upper.iteritems(), key=operator.itemgetter(0)), is_pub=False, t_type = t_type, pfun=pfun) - emit_table(f, "to_titlecase_table", - sorted(to_title.iteritems(), key=operator.itemgetter(0)), - is_pub=False, t_type = t_type, pfun=pfun) f.write("}\n\n") def emit_grapheme_module(f, grapheme_table, grapheme_cats): |
