aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-12-07 14:51:45 -0500
committerAustin Clements <austin@google.com>2021-12-07 21:32:48 +0000
commite08d1fba37ad32fbe7e8d57cd75c9a88dfdde87f (patch)
treecb4d0c9fd3c07ad352b67491510fd961609e1d1d /doc
parentdc50d69119ca8070dd16fb968b46f21f854d89fb (diff)
downloadgo-e08d1fba37ad32fbe7e8d57cd75c9a88dfdde87f.tar.gz
go-e08d1fba37ad32fbe7e8d57cd75c9a88dfdde87f.zip
doc/go1.18: mention bytes.Cut and strings.Cut
For #47694. Updates #46336. Change-Id: Ibbd058a1fd4d6b0aa38d3e8dc15b560d1e149f7e Reviewed-on: https://go-review.googlesource.com/c/go/+/369981 Trust: Austin Clements <austin@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/go1.18.html28
1 files changed, 20 insertions, 8 deletions
diff --git a/doc/go1.18.html b/doc/go1.18.html
index 8131afffdb..06c6786bf2 100644
--- a/doc/go1.18.html
+++ b/doc/go1.18.html
@@ -403,6 +403,16 @@ Do not send CLs removing the interior tags from such phrases.
<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
<dd>
+ <p><!-- CL 351710 -->
+ The new <a href="/pkg/bytes/#Cut"><code>Cut</code></a> function
+ slices a <code>[]byte</code> around a separator. It can replace
+ and simplify many common uses of
+ <a href="/pkg/bytes/#Index"><code>Index</code></a>,
+ <a href="/pkg/bytes/#IndexByte"><code>IndexByte</code></a>,
+ <a href="/pkg/bytes/#IndexRune"><code>IndexRune</code></a>,
+ and <a href="/pkg/bytes/#SplitN"><code>SplitN</code></a>.
+ </p>
+
<p><!-- CL 323318, CL 332771 -->
<a href="/pkg/bytes/#Trim"><code>Trim</code></a>, <a href="/pkg/bytes/#TrimLeft"><code>TrimLeft</code></a>,
and <a href="/pkg/bytes/#TrimRight"><code>TrimRight</code></a> are now allocation free and, especially for
@@ -414,10 +424,6 @@ Do not send CLs removing the interior tags from such phrases.
handle Unicode punctuation and language-specific capitalization rules, and is superseded by the
<a href="https://golang.org/x/text/cases">golang.org/x/text/cases</a> package.
</p>
-
- <p><!-- CL 351710 -->
- TODO: bytes.Cut.
- </p>
</dd>
</dl><!-- bytes -->
@@ -709,6 +715,16 @@ Do not send CLs removing the interior tags from such phrases.
<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
<dd>
+ <p><!-- CL 351710 -->
+ The new <a href="/pkg/strings/#Cut"><code>Cut</code></a> function
+ slices a <code>string</code> around a separator. It can replace
+ and simplify many common uses of
+ <a href="/pkg/strings/#Index"><code>Index</code></a>,
+ <a href="/pkg/strings/#IndexByte"><code>IndexByte</code></a>,
+ <a href="/pkg/strings/#IndexRune"><code>IndexRune</code></a>,
+ and <a href="/pkg/strings/#SplitN"><code>SplitN</code></a>.
+ </p>
+
<p><!-- CL 345849 -->
The new <a href="/pkg/strings/#Clone"><code>Clone</code></a> function copies the input
<code>string</code> without the returned cloned <code>string</code> referencing
@@ -726,10 +742,6 @@ Do not send CLs removing the interior tags from such phrases.
handle Unicode punctuation and language-specific capitalization rules, and is superseded by the
<a href="https://golang.org/x/text/cases">golang.org/x/text/cases</a> package.
</p>
-
- <p><!-- CL 351710 -->
- TODO: strings.Cut.
- </p>
</dd>
</dl><!-- strings -->