@@ -403,6 +403,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
403
403
404
404
< dl id ="bytes "> < dt > < a href ="/pkg/bytes/ "> bytes</ a > </ dt >
405
405
< dd >
406
+ < p > <!-- CL 351710 -->
407
+ The new < a href ="/pkg/bytes/#Cut "> < code > Cut</ code > </ a > function
408
+ slices a < code > []byte</ code > around a separator. It can replace
409
+ and simplify many common uses of
410
+ < a href ="/pkg/bytes/#Index "> < code > Index</ code > </ a > ,
411
+ < a href ="/pkg/bytes/#IndexByte "> < code > IndexByte</ code > </ a > ,
412
+ < a href ="/pkg/bytes/#IndexRune "> < code > IndexRune</ code > </ a > ,
413
+ and < a href ="/pkg/bytes/#SplitN "> < code > SplitN</ code > </ a > .
414
+ </ p >
415
+
406
416
< p > <!-- CL 323318, CL 332771 -->
407
417
< a href ="/pkg/bytes/#Trim "> < code > Trim</ code > </ a > , < a href ="/pkg/bytes/#TrimLeft "> < code > TrimLeft</ code > </ a > ,
408
418
and < a href ="/pkg/bytes/#TrimRight "> < code > TrimRight</ code > </ a > are now allocation free and, especially for
@@ -414,10 +424,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
414
424
handle Unicode punctuation and language-specific capitalization rules, and is superseded by the
415
425
< a href ="https://golang.org/x/text/cases "> golang.org/x/text/cases</ a > package.
416
426
</ p >
417
-
418
- < p > <!-- CL 351710 -->
419
- TODO: bytes.Cut.
420
- </ p >
421
427
</ dd >
422
428
</ dl > <!-- bytes -->
423
429
@@ -709,6 +715,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
709
715
710
716
< dl id ="strings "> < dt > < a href ="/pkg/strings/ "> strings</ a > </ dt >
711
717
< dd >
718
+ < p > <!-- CL 351710 -->
719
+ The new < a href ="/pkg/strings/#Cut "> < code > Cut</ code > </ a > function
720
+ slices a < code > string</ code > around a separator. It can replace
721
+ and simplify many common uses of
722
+ < a href ="/pkg/strings/#Index "> < code > Index</ code > </ a > ,
723
+ < a href ="/pkg/strings/#IndexByte "> < code > IndexByte</ code > </ a > ,
724
+ < a href ="/pkg/strings/#IndexRune "> < code > IndexRune</ code > </ a > ,
725
+ and < a href ="/pkg/strings/#SplitN "> < code > SplitN</ code > </ a > .
726
+ </ p >
727
+
712
728
< p > <!-- CL 345849 -->
713
729
The new < a href ="/pkg/strings/#Clone "> < code > Clone</ code > </ a > function copies the input
714
730
< code > string</ code > without the returned cloned < code > string</ code > referencing
@@ -726,10 +742,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
726
742
handle Unicode punctuation and language-specific capitalization rules, and is superseded by the
727
743
< a href ="https://golang.org/x/text/cases "> golang.org/x/text/cases</ a > package.
728
744
</ p >
729
-
730
- < p > <!-- CL 351710 -->
731
- TODO: strings.Cut.
732
- </ p >
733
745
</ dd >
734
746
</ dl > <!-- strings -->
735
747
0 commit comments