mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
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>
This commit is contained in:
parent
dc50d69119
commit
e08d1fba37
|
@ -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 -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue