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

Correct doc for \U escape sequence under Base/Strings/unescape_string #33285

Merged
merged 1 commit into from
Sep 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Correct doc for \U escape sequence
The `\U` escape sequence, which can take 1 - 8 hex digits, was presented as a duplicate of the `\u` escape sequence, which can only take 1 - 4 hex digits. I separated `\u` from `\U` so it would be easier to clarify the distinction between them. Also, added "max value" for `\U` since unlike `\x`, octal, and `\u` sequences, the max value for `\U` is _not_ the max of all 8 hex digits (i.e. `ffffffff` ).
  • Loading branch information
srutzky authored Sep 16, 2019
commit 5c71848ea95eb8f26d3d20b1433955239a0bd6df
3 changes: 2 additions & 1 deletion base/strings/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ The following escape sequences are recognised:
- Escaped backslash (`\\\\`)
- Escaped double-quote (`\\\"`)
- Standard C escape sequences (`\\a`, `\\b`, `\\t`, `\\n`, `\\v`, `\\f`, `\\r`, `\\e`)
- Unicode code points (`\\u` or `\\U` prefixes with 1-4 trailing hex digits)
- Unicode BMP code points (`\\u` with 1-4 trailing hex digits)
- All Unicode code points (`\\U` with 1-8 trailing hex digits; max value = 0010ffff)
- Hex bytes (`\\x` with 1-2 trailing hex digits)
- Octal bytes (`\\` with 1-3 trailing octal digits)

Expand Down