Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish improvements to "String Escape Sequences" section of "Strings (C# Programming Guide)" page #13310

Merged
merged 1 commit into from Jul 10, 2019

Conversation

Projects
None yet
2 participants
@srutzky
Copy link
Contributor

commented Jul 9, 2019

Make Unicode escapes more consistent with recent improvements made to https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings :

  1. Moved \v row up to be just under \t. This move provides for a more logical grouping of the escape sequences: simple, static ones first, followed by the dynamic Unicode escape sequences that require a user-supplied value. I think having this grouping will make the list more readable for most readers, which I feel is more important than maintaining strict alphabetical ordering of the list. The \v just seemed out of place between \u and \x, and if someone is looking for a Unicode escape sequence, I believe it helps to have those all together.

  2. Switched order of \u and \U so that \u could come first as that, again, seems to flow better / be a more logical progression.

  3. Changed character used for hex digit placeholder in escape sequence from n to H, as again, I feel it is more readable / more intuitive that "H" refers to "Hex" whereas "n" is ambiguous as "number"? And, it has more visual clarity since the lower-case "n" blends in a bit with "u" (at least to me it does).

  4. Added range for all user-supplied values (why make readers hunt elsewhere for that info, especially when \U is not as obvious as the other two?).

  5. Added generic format for \x

  6. Change example code point / character for \u and \x to something a little more interesting than "A" :-)

  7. Added missing example permutation of \x

For more details, please visit: https://bit.ly/UnicodeEscapeSequences

Finish improvements to "String Escape Sequences" section
Make Unicode escapes more consistent with recent improvements made to https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings

1.  Moved `\v` row up to be just under `\t`. This move provides for a more logical grouping of the escape sequences: simple, static ones first, followed by the dynamic Unicode escape sequences that require a user-supplied value. I think having this grouping will make the list more readable for most readers, which I feel is more important than maintaining strict alphabetical ordering of the list. The `\v` just seemed out of place between `\u` and `\x`, and if someone is looking for a Unicode escape sequence, I believe it helps to have those all together.

2. Switched order of `\u` and `\U` so that `\u` could come first as that, again, seems to flow better / be a more logical progression.

3. Changed character used for hex digit placeholder in escape sequence from `n` to `H`, as again, I feel it is more readable / more intuitive that "H" refers to "Hex" whereas "n" is ambiguous as "number"? And, it has more visual clarity since the lower-case "n" blends in a bit with "u" (at least to me it does).

4. Added range for all user-supplied values (why make readers hunt elsewhere for that info, especially when `\U` is not as obvious as the other two?).

5. Added generic format for `\x`

6. Change example code point / character for `\u` and `\x` to something a little more interesting than "A" :-)

7. Added missing example permutation of `\x`

For more details, please visit: https://bit.ly/UnicodeEscapeSequences

@srutzky srutzky requested a review from BillWagner as a code owner Jul 9, 2019

@BillWagner
Copy link
Member

left a comment

Thanks for continuing to make these improvements @srutzky We appreciate it.

I’ve reviewed the changes, and I’ll :shipit: now.

Thanks again.

@BillWagner BillWagner merged commit 26b60e5 into dotnet:master Jul 10, 2019

7 checks passed

Docs Content Validation Status: Succeeded
Details
OpenPublishing.Build Validation status: passed
Details
OpenPublishing.Build (1 of 3) Waiting for processor completed at 10:54:17 PST
OpenPublishing.Build (2 of 3) Preparing completed at 10:56:42 PST
OpenPublishing.Build (3 of 3) Building completed at 10:57:31 PST
WIP Ready for review
Details
license/cla All CLA requirements met.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.