about summary refs log tree commit diff
path: root/src/libcore/char
AgeCommit message (Collapse)AuthorLines
2019-03-19Rollup merge of #58778 - xfix:exact_size_case_mapping_iter, r=SimonSapinMazdak Farrokhzad-0/+22
Implement ExactSizeIterator for ToLowercase and ToUppercase
2019-03-19Update since annotation for ExactSizeIterator for ToUppercase/LowercaseKonrad Borowski-2/+2
This functionality was added in 1.35.0, not 1.34.0.
2019-02-27Implement ExactSizeIterator for ToLowercase and ToUppercaseKonrad Borowski-0/+22
2019-02-13Stabilize TryFrom and TryIntoSimon Sapin-4/+4
2019-02-12Auto merge of #58051 - SimonSapin:str_escape, r=alexcrichtonbors-3/+1
Stabilize str::escape_* methods with new return types… … that implement `Display` and `Iterator<Item=char>`, as proposed in FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2019-02-12Make the prema-unstable char::escape_debug_ext method crate-privateSimon Sapin-3/+1
2019-02-10libs: doc commentsAlexander Regueiro-11/+11
2018-12-25Remove licensesMark Rousskov-40/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-21update various stdlib docsSteve Klabnik-4/+2
2018-11-14core/char: Add comment to `to_digit()`Tobias Bieniek-0/+3
2018-11-14core/char: Drop `radix == 10` special caseTobias Bieniek-8/+1
This seems to perform equally well
2018-11-13core/char: Speed up `to_digit()` for `radix <= 10`Tobias Bieniek-5/+20
### Before ``` # Run 1 test char::methods::bench_to_digit_radix_10 ... bench: 16,265 ns/iter (+/- 1,774) test char::methods::bench_to_digit_radix_16 ... bench: 13,938 ns/iter (+/- 2,479) test char::methods::bench_to_digit_radix_2 ... bench: 13,090 ns/iter (+/- 524) test char::methods::bench_to_digit_radix_36 ... bench: 14,236 ns/iter (+/- 1,949) # Run 2 test char::methods::bench_to_digit_radix_10 ... bench: 16,176 ns/iter (+/- 1,589) test char::methods::bench_to_digit_radix_16 ... bench: 13,896 ns/iter (+/- 3,140) test char::methods::bench_to_digit_radix_2 ... bench: 13,158 ns/iter (+/- 1,112) test char::methods::bench_to_digit_radix_36 ... bench: 14,206 ns/iter (+/- 1,312) # Run 3 test char::methods::bench_to_digit_radix_10 ... bench: 16,221 ns/iter (+/- 2,423) test char::methods::bench_to_digit_radix_16 ... bench: 14,361 ns/iter (+/- 3,926) test char::methods::bench_to_digit_radix_2 ... bench: 13,097 ns/iter (+/- 671) test char::methods::bench_to_digit_radix_36 ... bench: 14,388 ns/iter (+/- 1,068) ``` ### After ``` # Run 1 test char::methods::bench_to_digit_radix_10 ... bench: 11,521 ns/iter (+/- 552) test char::methods::bench_to_digit_radix_16 ... bench: 12,926 ns/iter (+/- 684) test char::methods::bench_to_digit_radix_2 ... bench: 11,266 ns/iter (+/- 1,085) test char::methods::bench_to_digit_radix_36 ... bench: 14,213 ns/iter (+/- 614) # Run 2 test char::methods::bench_to_digit_radix_10 ... bench: 11,424 ns/iter (+/- 1,042) test char::methods::bench_to_digit_radix_16 ... bench: 12,854 ns/iter (+/- 1,193) test char::methods::bench_to_digit_radix_2 ... bench: 11,193 ns/iter (+/- 716) test char::methods::bench_to_digit_radix_36 ... bench: 14,249 ns/iter (+/- 3,514) # Run 3 test char::methods::bench_to_digit_radix_10 ... bench: 11,469 ns/iter (+/- 685) test char::methods::bench_to_digit_radix_16 ... bench: 12,852 ns/iter (+/- 568) test char::methods::bench_to_digit_radix_2 ... bench: 11,275 ns/iter (+/- 1,356) test char::methods::bench_to_digit_radix_36 ... bench: 14,188 ns/iter (+/- 1,501) ```
2018-11-13core/char: Replace condition + `panic!()` with `assert!()`Tobias Bieniek-3/+1
2018-11-10reduce list to functions callable in const ctx.Mazdak Farrokhzad-1/+1
2018-11-10constify parts of libcore.Mazdak Farrokhzad-2/+2
2018-09-25Add examples for docSon-4/+22
2018-08-20Add doc for impl From in char_convertSon-0/+8
2018-08-12Rollup merge of #53059 - ljedrz:unneeded_returns, r=kennytmGuillaume Gomez-2/+2
Remove explicit returns where unnecessary
2018-08-05Correct invalid feature attributesvarkor-20/+0
2018-08-04Remove explicit returns where unnecessaryljedrz-2/+2
2018-08-01Auto merge of #51609 - dscorbett:is_numeric, r=alexcrichtonbors-4/+4
Treat gc=No characters as numeric [`char::is_numeric`](https://doc.rust-lang.org/std/primitive.char.html#method.is_numeric) and [`char::is_alphanumeric`](https://doc.rust-lang.org/std/primitive.char.html#method.is_alphanumeric) are documented to be defined “in terms of the Unicode General Categories 'Nd', 'Nl', 'No'”, but unicode.py does not group 'No' with the other 'N' categories. These functions therefore currently return `false` for characters like ⟨¾⟩ and ⟨①⟩.
2018-07-30Remove unstable and deprecated APIsSimon Sapin-132/+0
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-18/+18
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-06-17Treat gc=No characters as numericDavid Corbett-4/+4
2018-05-30mod.rs isn't beautifuluuttff8-4/+4
2018-05-21Only escape extended grapheme characters in the first positionvarkor-12/+22
2018-05-21Use Grapheme_Extend instead of Mnvarkor-8/+8
2018-05-21Remove example in test for is_nonspacing_mark because it's currently privatevarkor-10/+0
2018-05-21Escape combining characters in escape_debugvarkor-2/+24
2018-04-24Rollup merge of #49970 - SimonSapin:deprecate, r=sfacklerkennytm-0/+14
Deprecate Read::chars and char::decode_utf8 Per FCP: * https://github.com/rust-lang/rust/issues/27802#issuecomment-377537778 * https://github.com/rust-lang/rust/issues/33906#issuecomment-377534308
2018-04-20Revert "Stabilize the TryFrom and TryInto traits"Felix S. Klock II-4/+4
This reverts commit e53a2a72743810e05f58c61c9d8a4c89b712ad2e.
2018-04-15Deprecate Read::chars and char::decode_utf8Simon Sapin-0/+14
Per FCP: * https://github.com/rust-lang/rust/issues/27802#issuecomment-377537778 * https://github.com/rust-lang/rust/issues/33906#issuecomment-377534308
2018-04-12Dedicated tracking issue for UnicodeVersion and UNICODE_VERSION.Simon Sapin-3/+3
2018-04-12Move core::char::printable to core::unicode::printableSimon Sapin-787/+1
2018-04-12Remove the CharExt trait, now that libcore has inherent methods for charSimon Sapin-181/+104
2018-04-12Move the rest of core::unicode::char to core::unicodeSimon Sapin-150/+1580
2018-04-12Move char conversions into a separate private module.Simon Sapin-290/+315
2018-04-12Move char decoding iterators into a separate private module.Simon Sapin-120/+265
2018-04-12Reexport from core::unicode::char in core::char rather than vice versaSimon Sapin-0/+12
2018-04-12Move the core::char module to its own directorySimon Sapin-0/+1713