diff options
| author | Ralf Jung <post@ralfj.de> | 2020-05-21 13:12:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-21 13:12:22 +0200 |
| commit | 0e887129adfe149b1089d9f719475f7c3a1c8e33 (patch) | |
| tree | 4097f3ee674562b6368caec53188491d0aee9b99 /library/std/src/sys/windows/stack_overflow_uwp.rs | |
| parent | 4f9fe914e23e25010e452a9c3fd3afb0a0070994 (diff) | |
| parent | f5b49572dde8743d9c4f36d736e560f3b21d0527 (diff) | |
| download | rust-0e887129adfe149b1089d9f719475f7c3a1c8e33.tar.gz rust-0e887129adfe149b1089d9f719475f7c3a1c8e33.zip | |
Rollup merge of #72371 - Elrendio:char_documentation, r=steveklabnik
FIX - Char documentation for unexperienced users This is my first PR on rust and even if I've read [CONTRIBUTING.md](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-requests) I'm ensure everything is perfect. Sorry if I didn't follow the exact procedure. **What it does:** - Add an example in the char documentation **Explanation** Unexperienced users might not know that punctuation is `Case_Ignorable` and not `Uppercase` and `Lowercase` which mean that when checking if a string is uppercase one might be tempted to write: ```rust my_string.chars().all(char::is_uppercase) ``` However this will return false for `"HELLO WORLD"` which is not intuitive. Since the function `is_case_ignorable` doesn't exists I believe the correct way to check is: ```rust !my_string.chars().any(char::is_lowercase) ``` The aim of this example is to prevent unexperienced users to make an error which punctuation chars.
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow_uwp.rs')
0 files changed, 0 insertions, 0 deletions
