Skip to content

Commit 879fef4

Browse files
srutzkyJeffBezanson
authored andcommitted
Correct doc for \U escape sequence (#33285)
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` ).
1 parent 7f2c436 commit 879fef4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/strings/io.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ The following escape sequences are recognised:
382382
- Escaped backslash (`\\\\`)
383383
- Escaped double-quote (`\\\"`)
384384
- Standard C escape sequences (`\\a`, `\\b`, `\\t`, `\\n`, `\\v`, `\\f`, `\\r`, `\\e`)
385-
- Unicode code points (`\\u` or `\\U` prefixes with 1-4 trailing hex digits)
385+
- Unicode BMP code points (`\\u` with 1-4 trailing hex digits)
386+
- All Unicode code points (`\\U` with 1-8 trailing hex digits; max value = 0010ffff)
386387
- Hex bytes (`\\x` with 1-2 trailing hex digits)
387388
- Octal bytes (`\\` with 1-3 trailing octal digits)
388389

0 commit comments

Comments
 (0)