From 32b7b50bafd0d40fda1caa93cf7f7068cc5052e3 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 24 Jun 2015 22:14:27 -0700 Subject: Remove char::to_titlecase. Fix #26555 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/libcoretest/char.rs | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/libcoretest') diff --git a/src/libcoretest/char.rs b/src/libcoretest/char.rs index 1506982586a..35f8372a709 100644 --- a/src/libcoretest/char.rs +++ b/src/libcoretest/char.rs @@ -102,29 +102,6 @@ fn test_to_uppercase() { assert_eq!(upper('ᾀ'), ['Ἀ', 'Ι']); } -#[test] -fn test_to_titlecase() { - fn title(c: char) -> Vec { - c.to_titlecase().collect() - } - assert_eq!(title('a'), ['A']); - assert_eq!(title('ö'), ['Ö']); - assert_eq!(title('ß'), ['S', 's']); // not ẞ: Latin capital letter sharp s - assert_eq!(title('ü'), ['Ü']); - assert_eq!(title('💩'), ['💩']); - - assert_eq!(title('σ'), ['Σ']); - assert_eq!(title('τ'), ['Τ']); - assert_eq!(title('ι'), ['Ι']); - assert_eq!(title('γ'), ['Γ']); - assert_eq!(title('μ'), ['Μ']); - assert_eq!(title('α'), ['Α']); - assert_eq!(title('ς'), ['Σ']); - assert_eq!(title('DŽ'), ['Dž']); - assert_eq!(title('fi'), ['F', 'i']); - assert_eq!(title('ᾀ'), ['ᾈ']); -} - #[test] fn test_is_control() { assert!('\u{0}'.is_control()); -- cgit 1.4.1-3-g733a5