File tree 2 files changed +5
-0
lines changed
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ Standard library changes
73
73
* ` Base.@kwdef ` can now be used for parametric structs, and for structs with supertypes ([ #29316 ] ).
74
74
* ` merge(::NamedTuple, ::NamedTuple...) ` can now be used with more than 2 ` NamedTuple ` s ([ #29259 ] ).
75
75
* ` Future.copy! ` has been moved to ` Base ` ([ #29178 ] ).
76
+ * New ` ncodeunits(c::Char) ` method as a fast equivalent to ` ncodeunits(string(c)) ` ([ #29153 ] ).
76
77
77
78
Compiler/Runtime improvements
78
79
-----------------------------
Original file line number Diff line number Diff line change 56
56
Return the number of code units required to encode a character as UTF-8.
57
57
This is the number of bytes which will be printed if the character is written
58
58
to an output stream, or `ncodeunits(string(c))` but computed efficiently.
59
+
60
+ !!! compat "Julia 1.1"
61
+ This method requires at least Julia 1.1. In Julia 1.0 consider
62
+ using `ncodeunits(string(c))`.
59
63
"""
60
64
ncodeunits (c:: Char ) = write (devnull , c) # this is surprisingly efficient
61
65
You can’t perform that action at this time.
0 commit comments