<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="A UTF-8-encoded fixed string"><title>Str in clap::builder - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="clap"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)"data-channel="1.77.0"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button><aclass="logo-container"href="../../clap/index.html"><imgsrc="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png"alt=""></a></nav><navclass="sidebar"><divclass="sidebar-crate"><aclass="logo-container"href="../../clap/index.html"><imgsrc="https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png"alt="logo"></a><h2><ahref="../../clap/index.html">clap</a><spanclass="version">4.5.2</span></h2></div><h2class="location"><ahref="#">Str</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.as_str">as_str</a></li></ul><h3><ahref="#deref-methods-str">Methods from Deref<Target=str></a></h3><ulclass="block deref-methods"><li><ahref="#method.as_ascii">as_ascii</a></li><li><ahref="#method.as_bytes">as_bytes</a></li><li><ahref="#method.as_ptr">as_ptr</a></li><li><ahref="#method.bytes">bytes</a></li><li><ahref="#method.ceil_char_boundary">ceil_char_boundary</a></li><li><ahref="#method.char_indices">char_indices</a></li><li><ahref="#method.chars">chars</a></li><li><ahref="#method.contains">contains</a></li><li><ahref="#method.encode_utf16">encode_utf16</a></li><li><ahref="#method.ends_with">ends_with</a></li><li><ahref="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><ahref="#method.escape_debug">escape_debug</a></li><li><ahref="#method.escape_default">escape_default</a></li><li><ahref="#method.escape_unicode">escape_unicode</a></li><li><ahref="#method.find">find</a></li><li><ahref="#method.floor_char_boundary">floor_char_boundary</a></li><li><ahref="#method.get">get</a></li><li><ahref="#method.get_unchecked">get_unchecked</a></li><li><ahref="#method.is_ascii">is_ascii</a></li><li><ahref="#method.is_char_boundary">is_char_boundary</a></li><li>
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#10">source</a><ahref="#impl-Str"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_str"class="method"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#36">source</a><h4class="code-header">pub fn <ahref="#method.as_str"class="fn">as_str</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Get the raw string of the <code>Str</code></p>
</div></details></div></details></div><h2id="deref-methods-str"class="section-header"><span>Methods from <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a><Target = <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>></span><ahref="#deref-methods-str"class="anchor">§</a></h2><divid="deref-methods-str-1"class="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#167">source</a></span><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the length of <code>self</code>.</p>
<p>This length is in bytes, not <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s or graphemes. In other words,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#186">source</a></span><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if <code>self</code> has a length of zero bytes.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_char_boundary"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.9.0">1.9.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#216">source</a></span><h4class="code-header">pub fn <ahref="#method.is_char_boundary"class="fn">is_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks that <code>index</code>-th byte is the first byte in a UTF-8 code point
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.floor_char_boundary"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#263">source</a><h4class="code-header">pub fn <ahref="#method.floor_char_boundary"class="fn">floor_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>round_char_boundary</code>)</span></div></span></summary><divclass="docblock"><p>Finds the closest <code>x</code> not exceeding <code>index</code> where <code>is_char_boundary(x)</code> is <code>true</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ceil_char_boundary"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#301">source</a><h4class="code-header">pub fn <ahref="#method.ceil_char_boundary"class="fn">ceil_char_boundary</a>(&self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>round_char_boundary</code>)</span></div></span></summary><divclass="docblock"><p>Finds the closest <code>x</code> not below <code>index</code> where <code>is_char_boundary(x)</code> is <code>true</code>.</p>
<p>This method is the natural complement to <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.floor_char_boundary"title="method str::floor_char_boundary"><code>floor_char_boundary</code></a>. See that method
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_bytes"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#327">source</a></span><h4class="code-header">pub fn <ahref="#method.as_bytes"class="fn">as_bytes</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><divclass="docblock"><p>Converts a string slice to a byte slice. To convert the byte slice back
into a string slice, use the <ahref="https://doc.rust-lang.org/1.77.0/core/str/converts/fn.from_utf8.html"title="fn core::str::converts::from_utf8"><code>from_utf8</code></a> function.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ptr"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#401">source</a></span><h4class="code-header">pub fn <ahref="#method.as_ptr"class="fn">as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const </a><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section></summary><divclass="docblock"><p>Converts a string slice to a raw pointer.</p>
<ahref="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html"title="primitive u8"><code>u8</code></a>. This pointer will be pointing to the first byte of the string
If you need to mutate the contents of the string slice, use <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.as_mut_ptr"title="method str::as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.20.0">1.20.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#442">source</a></span><h4class="code-header">pub fn <ahref="#method.get"class="fn">get</a><I>(&self, i: I) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a>><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns a subslice of <code>str</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_unchecked"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.20.0">1.20.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#506">source</a></span><h4class="code-header">pub unsafe fn <ahref="#method.get_unchecked"class="fn">get_unchecked</a><I>(&self, i: I) ->&<I as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output"title="type core::slice::index::SliceIndex::Output">Output</a><divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html"title="trait core::slice::index::SliceIndex">SliceIndex</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>,</div></h4></section></summary><divclass="docblock"><p>Returns an unchecked subslice of <code>str</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.slice_unchecked"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#592">source</a></span><h4class="code-header">pub unsafe fn <ahref="#method.slice_unchecked"class="fn">slice_unchecked</a>(&self, begin: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, end: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.29.0: use <code>get_unchecked(begin..end)</code> instead</span></div></span></summary><divclass="docblock"><p>Creates a string slice from another string slice, bypassing safety
alternative see <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html"title="primitive str"><code>str</code></a> and <ahref="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html"title="trait core::ops::index::Index"><code>Index</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.4.0">1.4.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#664">source</a></span><h4class="code-header">pub fn <ahref="#method.split_at"class="fn">split_at</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>)</h4></section></summary><divclass="docblock"><p>Divide one string slice into two at an index.</p>
<p>To get mutable string slices instead, see the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_at_mut"title="method str::split_at_mut"><code>split_at_mut</code></a>
<p>Panics if <code>mid</code> is not on a UTF-8 code point boundary, or if it is past
the end of the last code point of the string slice. For a non-panicking
alternative see <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_at_checked"title="method str::split_at_checked"><code>split_at_checked</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_at_checked"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#745">source</a><h4class="code-header">pub fn <ahref="#method.split_at_checked"class="fn">split_at_checked</a>(&self, mid: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>)></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><divclass="docblock"><p>Divide one string slice into two at an index.</p>
<p>The argument, <code>mid</code>, should be a valid byte offset from the start of the
string. It must also be on the boundary of a UTF-8 code point. The
method returns <code>None</code> if that’s not the case.</p>
<p>The two slices returned go from the start of the string slice to <code>mid</code>,
and from <code>mid</code> to the end of the string slice.</p>
<p>To get mutable string slices instead, see the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_at_mut_checked"title="method str::split_at_mut_checked"><code>split_at_mut_checked</code></a>
</span><spanclass="macro">assert_eq!</span>(<spanclass="prelude-val">None</span>, s.split_at_checked(<spanclass="number">16</span>)); <spanclass="comment">// Beyond the string length</span></code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.chars"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#864">source</a></span><h4class="code-header">pub fn <ahref="#method.chars"class="fn">chars</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.Chars.html"title="struct core::str::iter::Chars">Chars</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator over the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s of a string slice.</p>
string slice by <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>. This method returns such an iterator.</p>
<p>It’s important to remember that <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a> represents a Unicode Scalar
<p>Remember, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s might not match your intuition about characters:</p>
<spanclass="macro">assert_eq!</span>(<spanclass="prelude-val">Some</span>(<spanclass="string">'y'</span>), chars.next()); <spanclass="comment">// not 'y̆'
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.char_indices"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#921">source</a></span><h4class="code-header">pub fn <ahref="#method.char_indices"class="fn">char_indices</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.CharIndices.html"title="struct core::str::iter::CharIndices">CharIndices</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator over the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s of a string slice, and their
string slice by <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>. This method returns an iterator of both
these <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, as well as their byte positions.</p>
<p>The iterator yields tuples. The position is first, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a> is
<p>Remember, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s might not match your intuition about characters:</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.bytes"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#944">source</a></span><h4class="code-header">pub fn <ahref="#method.bytes"class="fn">bytes</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.Bytes.html"title="struct core::str::iter::Bytes">Bytes</a><'_></h4></section></summary><divclass="docblock"><p>An iterator over the bytes of a string slice.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_whitespace"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.1.0">1.1.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#996">source</a></span><h4class="code-header">pub fn <ahref="#method.split_whitespace"class="fn">split_whitespace</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.SplitWhitespace.html"title="struct core::str::iter::SplitWhitespace">SplitWhitespace</a><'_></h4></section></summary><divclass="docblock"><p>Splits a string slice by whitespace.</p>
instead, use <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_ascii_whitespace"title="method str::split_ascii_whitespace"><code>split_ascii_whitespace</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_ascii_whitespace"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1045">source</a></span><h4class="code-header">pub fn <ahref="#method.split_ascii_whitespace"class="fn">split_ascii_whitespace</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.SplitAsciiWhitespace.html"title="struct core::str::iter::SplitAsciiWhitespace">SplitAsciiWhitespace</a><'_></h4></section></summary><divclass="docblock"><p>Splits a string slice by ASCII whitespace.</p>
<p>To split by Unicode <code>Whitespace</code> instead, use <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_whitespace"title="method str::split_whitespace"><code>split_whitespace</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lines"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1098">source</a></span><h4class="code-header">pub fn <ahref="#method.lines"class="fn">lines</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.Lines.html"title="struct core::str::iter::Lines">Lines</a><'_></h4></section></summary><divclass="docblock"><p>An iterator over the lines of a string, as string slices.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lines_any"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1107">source</a></span><h4class="code-header">pub fn <ahref="#method.lines_any"class="fn">lines_any</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.LinesAny.html"title="struct core::str::iter::LinesAny">LinesAny</a><'_></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.4.0: use lines() instead now</span></div></span></summary><divclass="docblock"><p>An iterator over the lines of a string.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.encode_utf16"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.8.0">1.8.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1126">source</a></span><h4class="code-header">pub fn <ahref="#method.encode_utf16"class="fn">encode_utf16</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.EncodeUtf16.html"title="struct core::str::iter::EncodeUtf16">EncodeUtf16</a><'_></h4></section></summary><divclass="docblock"><p>Returns an iterator of <code>u16</code> over the string encoded as UTF-16.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.contains"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1151">source</a></span><h4class="code-header">pub fn <ahref="#method.contains"class="fn">contains</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the given pattern matches a sub-slice of
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.starts_with"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1175">source</a></span><h4class="code-header">pub fn <ahref="#method.starts_with"class="fn">starts_with</a><'a, P>(&'a self, pat: P) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the given pattern matches a prefix of this
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if the given pattern matches a suffix of this
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1250">source</a></span><h4class="code-header">pub fn <ahref="#method.find"class="fn">find</a><'a, P>(&'a self, pat: P) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns the byte index of the first character of this string slice that
<p>Returns <ahref="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html#variant.None"title="variant core::option::Option::None"><code>None</code></a> if the pattern doesn’t match.</p>
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns the byte index for the first character of the last match of the pattern in
<p>Returns <ahref="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html#variant.None"title="variant core::option::Option::None"><code>None</code></a> if the pattern doesn’t match.</p>
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1418">source</a></span><h4class="code-header">pub fn <ahref="#method.split"class="fn">split</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.Split.html"title="struct core::str::iter::Split">Split</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.rsplit"title="method str::rsplit"><code>rsplit</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb"</span>.split(<spanclass="string">' '</span>).collect();
<divclass="example-wrap ignore"><ahref="#"class="tooltip"title="This example is not tested">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(d, <spanclass="kw-2">&</span>[<spanclass="string">"a"</span>, <spanclass="string">"b"</span>, <spanclass="string">"c"</span>]);</code></pre></div>
<p>Use <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_whitespace"title="method str::split_whitespace"><code>split_whitespace</code></a> for this behavior.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_inclusive"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.51.0">1.51.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1458">source</a></span><h4class="code-header">pub fn <ahref="#method.split_inclusive"class="fn">split_inclusive</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.SplitInclusive.html"title="struct core::str::iter::SplitInclusive">SplitInclusive</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb\nlittle lamb\nlittle lamb."
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"Mary had a little lamb\n"</span>, <spanclass="string">"little lamb\n"</span>, <spanclass="string">"little lamb."</span>]);</code></pre></div>
<p>If the last element of the string is matched,
that element will be considered the terminator of the preceding substring.
That substring will be the last item returned by the iterator.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"Mary had a little lamb\n"</span>, <spanclass="string">"little lamb\n"</span>, <spanclass="string">"little lamb.\n"</span>]);</code></pre></div>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split"title="method str::split"><code>split</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb"</span>.rsplit(<spanclass="string">' '</span>).collect();
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_terminator"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1562">source</a></span><h4class="code-header">pub fn <ahref="#method.split_terminator"class="fn">split_terminator</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.SplitTerminator.html"title="struct core::str::iter::SplitTerminator">SplitTerminator</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>Equivalent to <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split"title="method str::split"><code>split</code></a>, except that the trailing substring
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.rsplit_terminator"title="method str::rsplit_terminator"><code>rsplit_terminator</code></a> method can be used.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of <code>self</code>, separated by characters
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>Equivalent to <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split"title="method str::split"><code>split</code></a>, except that the trailing substring is
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.split_terminator"title="method str::split_terminator"><code>split_terminator</code></a> method can be
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.splitn"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1663">source</a></span><h4class="code-header">pub fn <ahref="#method.splitn"class="fn">splitn</a><'a, P>(&'a self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.SplitN.html"title="struct core::str::iter::SplitN">SplitN</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of the given string slice, separated by a
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>If the pattern allows a reverse search, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.rsplitn"title="method str::rsplitn"><code>rsplitn</code></a> method can be
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lambda"</span>.splitn(<spanclass="number">3</span>, <spanclass="string">' '</span>).collect();
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"Mary"</span>, <spanclass="string">"had"</span>, <spanclass="string">"a little lambda"</span>]);
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over substrings of this string slice, separated by a
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>For splitting from the front, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.splitn"title="method str::splitn"><code>splitn</code></a> method can be used.</p>
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>v: Vec<<spanclass="kw-2">&</span>str> = <spanclass="string">"Mary had a little lamb"</span>.rsplitn(<spanclass="number">3</span>, <spanclass="string">' '</span>).collect();
<spanclass="macro">assert_eq!</span>(v, [<spanclass="string">"lamb"</span>, <spanclass="string">"little"</span>, <spanclass="string">"Mary had a"</span>]);
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.split_once"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.52.0">1.52.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1732">source</a></span><h4class="code-header">pub fn <ahref="#method.split_once"class="fn">split_once</a><'a, P>(&'a self, delimiter: P) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, &'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>)><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Splits the string on the first occurrence of the specified delimiter and
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Splits the string on the last occurrence of the specified delimiter and
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.matches"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1790">source</a></span><h4class="code-header">pub fn <ahref="#method.matches"class="fn">matches</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.Matches.html"title="struct core::str::iter::Matches">Matches</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within the given string
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.rmatches"title="method str::rmatches"><code>rmatches</code></a> method can be used.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within this string slice,
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.matches"title="method str::matches"><code>matches</code></a> method can be used.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.match_indices"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.5.0">1.5.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1868">source</a></span><h4class="code-header">pub fn <ahref="#method.match_indices"class="fn">match_indices</a><'a, P>(&'a self, pat: P) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.MatchIndices.html"title="struct core::str::iter::MatchIndices">MatchIndices</a><'a, P><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within this string
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<p>The returned iterator will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if the pattern
elements. This is true for, e.g., <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, but not for <code>&str</code>.</p>
from a forward search, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.rmatch_indices"title="method str::rmatch_indices"><code>rmatch_indices</code></a> method can be used.</p>
<spanclass="macro">assert_eq!</span>(v, [(<spanclass="number">0</span>, <spanclass="string">"aba"</span>)]); <spanclass="comment">// only the first `aba`</span></code></pre></div>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>An iterator over the disjoint matches of a pattern within <code>self</code>,
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
search, and it will be a <ahref="https://doc.rust-lang.org/1.77.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html"title="trait core::iter::traits::double_ended::DoubleEndedIterator"><code>DoubleEndedIterator</code></a> if a forward/reverse
<p>For iterating from the front, the <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.match_indices"title="method str::match_indices"><code>match_indices</code></a> method can be used.</p>
<spanclass="macro">assert_eq!</span>(v, [(<spanclass="number">2</span>, <spanclass="string">"aba"</span>)]); <spanclass="comment">// only the last `aba`</span></code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1932">source</a></span><h4class="code-header">pub fn <ahref="#method.trim"class="fn">trim</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with leading and trailing whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_start"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#1971">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_start"class="fn">trim_start</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with leading whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_end"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2010">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_end"class="fn">trim_end</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><divclass="docblock"><p>Returns a string slice with trailing whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_left"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2050">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_left"class="fn">trim_left</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_start</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with leading whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_right"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2090">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_right"class="fn">trim_right</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_end</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with trailing whitespace removed.</p>
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.DoubleEndedSearcher.html"title="trait core::str::pattern::DoubleEndedSearcher">DoubleEndedSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with all prefixes and suffixes that match a
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a function
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(<spanclass="string">"1foo1barXX"</span>.trim_matches(|c| c == <spanclass="string">'1' </span>|| c == <spanclass="string">'X'</span>), <spanclass="string">"foo1bar"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_start_matches"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.30.0">1.30.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2170">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_start_matches"class="fn">trim_start_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with all prefixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.strip_prefix"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.45.0">1.45.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2203">source</a></span><h4class="code-header">pub fn <ahref="#method.strip_prefix"class="fn">strip_prefix</a><'a, P>(&'a self, prefix: P) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with the prefix removed.</p>
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with the suffix removed.</p>
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Returns a string slice with all suffixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(<spanclass="string">"1fooX"</span>.trim_end_matches(|c| c == <spanclass="string">'1' </span>|| c == <spanclass="string">'X'</span>), <spanclass="string">"1foo"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_left_matches"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2318">source</a></span><h4class="code-header">pub fn <ahref="#method.trim_left_matches"class="fn">trim_left_matches</a><'a, P>(&'a self, pat: P) ->&'a <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_start_matches</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with all prefixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<P as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html#associatedtype.Searcher"title="type core::str::pattern::Pattern::Searcher">Searcher</a>: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.ReverseSearcher.html"title="trait core::str::pattern::ReverseSearcher">ReverseSearcher</a><'a>,</div></h4></section><spanclass="item-info"><divclass="stab deprecated"><spanclass="emoji">👎</span><span>Deprecated since 1.33.0: superseded by <code>trim_end_matches</code></span></div></span></summary><divclass="docblock"><p>Returns a string slice with all suffixes that match a pattern
<p>The <ahref="https://doc.rust-lang.org/1.77.0/core/str/pattern/index.html"title="mod core::str::pattern">pattern</a> can be a <code>&str</code>, <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>, a slice of <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html"title="primitive char"><code>char</code></a>s, or a
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="macro">assert_eq!</span>(<spanclass="string">"1fooX"</span>.trim_right_matches(|c| c == <spanclass="string">'1' </span>|| c == <spanclass="string">'X'</span>), <spanclass="string">"1foo"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.parse"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2413">source</a></span><h4class="code-header">pub fn <ahref="#method.parse"class="fn">parse</a><F>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><F, <F as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr">FromStr</a>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/str/traits/trait.FromStr.html#associatedtype.Err"title="type core::str::traits::FromStr::Err">Err</a>><divclass="where">where
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr">FromStr</a>,</div></h4></section></summary><divclass="docblock"><p>Parses this string slice into another type.</p>
<p><code>parse</code> can parse into any type that implements the <ahref="https://doc.rust-lang.org/1.77.0/core/str/traits/trait.FromStr.html"title="trait core::str::traits::FromStr"><code>FromStr</code></a> trait.</p>
<p>Will return <ahref="https://doc.rust-lang.org/1.77.0/core/str/traits/trait.FromStr.html#associatedtype.Err"title="associated type core::str::traits::FromStr::Err"><code>Err</code></a> if it’s not possible to parse this string slice into
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_ascii"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2432">source</a></span><h4class="code-header">pub fn <ahref="#method.is_ascii"class="fn">is_ascii</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks if all characters in this string are within the ASCII range.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ascii"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2444">source</a><h4class="code-header">pub fn <ahref="#method.as_ascii"class="fn">as_ascii</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html"title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><divclass="docblock"><p>If this string slice <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.is_ascii"title="method str::is_ascii"><code>is_ascii</code></a>, returns it as a slice
of <ahref="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html"title="enum core::ascii::ascii_char::AsciiChar">ASCII characters</a>, otherwise returns <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq_ignore_ascii_case"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2464">source</a></span><h4class="code-header">pub fn <ahref="#method.eq_ignore_ascii_case"class="fn">eq_ignore_ascii_case</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Checks that two strings are an ASCII case-insensitive match.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii_start"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2542">source</a><h4class="code-header">pub fn <ahref="#method.trim_ascii_start"class="fn">trim_ascii_start</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><divclass="docblock"><p>Returns a string slice with leading ASCII whitespace removed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.trim_ascii"class="method"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2595">source</a><h4class="code-header">pub fn <ahref="#method.trim_ascii"class="fn">trim_ascii</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><divclass="docblock"><p>Returns a string slice with leading and trailing ASCII whitespace
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_debug"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2638">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_debug"class="fn">escape_debug</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.EscapeDebug.html"title="struct core::str::iter::EscapeDebug">EscapeDebug</a><'_></h4></section></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html#method.escape_debug"title="method char::escape_debug"><code>char::escape_debug</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_default"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2684">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_default"class="fn">escape_default</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.EscapeDefault.html"title="struct core::str::iter::EscapeDefault">EscapeDefault</a><'_></h4></section></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html#method.escape_default"title="method char::escape_default"><code>char::escape_default</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.escape_unicode"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.34.0">1.34.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/str/mod.rs.html#2722">source</a></span><h4class="code-header">pub fn <ahref="#method.escape_unicode"class="fn">escape_unicode</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/str/iter/struct.EscapeUnicode.html"title="struct core::str::iter::EscapeUnicode">EscapeUnicode</a><'_></h4></section></summary><divclass="docblock"><p>Return an iterator that escapes each char in <code>self</code> with <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.char.html#method.escape_unicode"title="method char::escape_unicode"><code>char::escape_unicode</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.replace"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#271">source</a></span><h4class="code-header">pub fn <ahref="#method.replace"class="fn">replace</a><'a, P>(&'a self, from: P, to: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Replaces all matches of a pattern with another string.</p>
<p><code>replace</code> creates a new <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>, and copies the data from this string slice into it.
<divclass="example-wrap"><preclass="rust rust-example-rendered"><code><spanclass="kw">let </span>s = <spanclass="string">"this is old"</span>;
<spanclass="macro">assert_eq!</span>(<spanclass="string">"this is new"</span>, s.replace(<spanclass="string">"old"</span>, <spanclass="string">"new"</span>));
<spanclass="macro">assert_eq!</span>(<spanclass="string">"than an old"</span>, s.replace(<spanclass="string">"is"</span>, <spanclass="string">"an"</span>));</code></pre></div>
<p>When the pattern doesn’t match, it returns this string slice as <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>:</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.replacen"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.16.0">1.16.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#311">source</a></span><h4class="code-header">pub fn <ahref="#method.replacen"class="fn">replacen</a><'a, P>(&'a self, pat: P, to: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, count: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a><divclass="where">where
P: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/str/pattern/trait.Pattern.html"title="trait core::str::pattern::Pattern">Pattern</a><'a>,</div></h4></section></summary><divclass="docblock"><p>Replaces first N matches of a pattern with another string.</p>
<p><code>replacen</code> creates a new <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>, and copies the data from this string slice into it.
<p>When the pattern doesn’t match, it returns this string slice as <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>:</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_lowercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#368">source</a></span><h4class="code-header">pub fn <ahref="#method.to_lowercase"class="fn">to_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns the lowercase equivalent of this string slice, as a new <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>.</p>
the case, this function returns a <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a> instead of modifying the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_uppercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#459">source</a></span><h4class="code-header">pub fn <ahref="#method.to_uppercase"class="fn">to_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns the uppercase equivalent of this string slice, as a new <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a>.</p>
the case, this function returns a <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a> instead of modifying the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.repeat"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.16.0">1.16.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#529">source</a></span><h4class="code-header">pub fn <ahref="#method.repeat"class="fn">repeat</a>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Creates a new <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String"><code>String</code></a> by repeating a string <code>n</code> times.</p>
<divclass="example-wrap should_panic"><ahref="#"class="tooltip"title="This example panics">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="comment">// this will panic at runtime
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_ascii_uppercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#559">source</a></span><h4class="code-header">pub fn <ahref="#method.to_ascii_uppercase"class="fn">to_ascii_uppercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns a copy of this string where each character is mapped to its
<p>To uppercase the value in-place, use <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.make_ascii_uppercase"title="method str::make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_ascii_lowercase"class="method"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.23.0">1.23.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/alloc/str.rs.html#591">source</a></span><h4class="code-header">pub fn <ahref="#method.to_ascii_lowercase"class="fn">to_ascii_lowercase</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Returns a copy of this string where each character is mapped to its
<p>To lowercase the value in-place, use <ahref="https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.make_ascii_lowercase"title="method str::make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
</div></details></div><h2id="trait-implementations"class="section-header">Trait Implementations<ahref="#trait-implementations"class="anchor">§</a></h2><divid="trait-implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-AsRef%3C%5Bu8%5D%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#127">source</a><ahref="#impl-AsRef%3C%5Bu8%5D%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ref-2"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#129">source</a><ahref="#method.as_ref-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref"class="fn">as_ref</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><divclass='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-AsRef%3COsStr%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#134">source</a><ahref="#impl-AsRef%3COsStr%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ref-1"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#136">source</a><ahref="#method.as_ref-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref"class="fn">as_ref</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a></h4></section></summary><divclass='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-AsRef%3CPath%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#141">source</a><ahref="#impl-AsRef%3CPath%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ref-3"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#143">source</a><ahref="#method.as_ref-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref"class="fn">as_ref</a>(&self) ->&<aclass
__H: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><divclass='docblock'>Feeds this value into the given <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.hash_slice"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.3.0">1.3.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/hash/mod.rs.html#238-240">source</a></span><ahref="#method.hash_slice"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice"class="fn">hash_slice</a><H>(data: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[Self]</a>, state: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut H</a>)<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Feeds a slice of this type into the given <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-IntoResettable%3CStr%3E-for-Option%3C%26str%3E"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#133">source</a><ahref="#impl-IntoResettable%3CStr%3E-for-Option%3C%26str%3E"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="trait.IntoResettable.html"title="trait clap::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for <aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'static <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_resettable"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#134">source</a><ahref="#method.into_resettable"class="anchor">§</a><h4class="code-header">fn <ahref="trait.IntoResettable.html#tymethod.into_resettable"class="fn">into_resettable</a>(self) -><aclass="enum"href="enum.Resettable.html"title="enum clap::builder::Resettable">Resettable</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>></h4></section></summary><divclass='docblock'>Convert to the intended resettable type</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Ord-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#impl-Ord-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.cmp"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#method.cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp"class="fn">cmp</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><divclass='docblock'>This method returns an <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.max"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><ahref="#method.max"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max"class="fn">max</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the maximum of two values. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.min"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.21.0">1.21.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><ahref="#method.min"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min"class="fn">min</a>(self, other: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Compares and returns the minimum of two values. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clamp"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.50.0">1.50.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><ahref="#method.clamp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp"class="fn">clamp</a>(self, min: Self, max: Self) -> Self<divclass="where">where
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><divclass='docblock'>Restrict a value to a certain interval. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3C%26OsStr%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#194">source</a><ahref="#impl-PartialEq%3C%26OsStr%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><&<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-8"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#196">source</a><ahref="#method.eq-8"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &&<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-8"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-8"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3C%26str%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#168">source</a><ahref="#impl-PartialEq%3C%26str%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-2"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#170">source</a><ahref="#method.eq-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &&<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-2"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CId%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/util/id.rs.html#146">source</a><ahref="#impl-PartialEq%3CId%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="../struct.Id.html"title="struct clap::Id">Id</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-7"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/util/id.rs.html#148">source</a><ahref="#method.eq-7"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="../struct.Id.html"title="struct clap::Id">Id</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-7"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-7"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3COsStr%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#181">source</a><ahref="#impl-PartialEq%3COsStr%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-4"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#183">source</a><ahref="#method.eq-4"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-4"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-4"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CStr%3E-for-%26OsStr"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#200">source</a><ahref="#impl-PartialEq%3CStr%3E-for-%26OsStr"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for &<aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-1"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#202">source</a><ahref="#method.eq-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-1"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CStr%3E-for-%26str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#174">source</a><ahref="#impl-PartialEq%3CStr%3E-for-%26str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-5"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#176">source</a><ahref="#method.eq-5"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-5"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-5"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CStr%3E-for-Id"class="impl"><aclass="src rightside"href="../../src/clap_builder/util/id.rs.html#140">source</a><ahref="#impl-PartialEq%3CStr%3E-for-Id"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for <aclass="struct"href="../struct.Id.html"title="struct clap::Id">Id</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-11"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/util/id.rs.html#142">source</a><ahref="#method.eq-11"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-11"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-11"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CStr%3E-for-OsStr"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#187">source</a><ahref="#impl-PartialEq%3CStr%3E-for-OsStr"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for <aclass="struct"href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html"title="struct std::ffi::os_str::OsStr">OsStr</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-10"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#189">source</a><ahref="#method.eq-10"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-10"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-10"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CStr%3E-for-str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#161">source</a><ahref="#impl-PartialEq%3CStr%3E-for-str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-3"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#163">source</a><ahref="#method.eq-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-3"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-3"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3CString%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#207">source</a><ahref="#impl-PartialEq%3CString%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-6"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#209">source</a><ahref="#method.eq-6"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-6"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-6"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq%3Cstr%3E-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#155">source</a><ahref="#impl-PartialEq%3Cstr%3E-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#157">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#impl-PartialEq-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq-9"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#method.eq-9"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne-9"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne-9"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialOrd-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#impl-PartialOrd-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.partial_cmp"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#method.partial_cmp"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp"class="fn">partial_cmp</a>(&self, other: &<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><divclass='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.lt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><ahref="#method.lt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt"class="fn">lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.le"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><ahref="#method.le"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le"class="fn">le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gt"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><ahref="#method.gt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt"class="fn">gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ge"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><ahref="#method.ge"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge"class="fn">ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
operator. <ahref="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><sectionid="impl-Eq-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#impl-Eq-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section><sectionid="impl-StructuralPartialEq-for-Str"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/str.rs.html#5">source</a><ahref="#impl-StructuralPartialEq-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html"title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-Str"class="impl"><ahref="#impl-RefUnwindSafe-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section><sectionid="impl-Send-for-Str"class="impl"><ahref="#impl-Send-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section><sectionid="impl-Sync-for-Str"class="impl"><ahref="#impl-Sync-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section><sectionid="impl-Unpin-for-Str"class="impl"><ahref="#impl-Unpin-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html"title="trait core::marker::Unpin">Unpin</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section><sectionid="impl-UnwindSafe-for-Str"class="impl"><ahref="#impl-UnwindSafe-for-Str"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html"title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a></h3></section></div><h2id="blanket-implementations"class="section-header">Blanket Implementations<ahref="#blanket-implementations"class="anchor">§</a></h2><divid="blanket-implementations-list"><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Any-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><ahref="#impl-Any-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T<divclass="where">where
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><ahref="#impl-Borrow%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow-1"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><ahref="#method.borrow-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><ahref="#impl-BorrowMut%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fn">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><ahref="#impl-From%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from-8"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><ahref="#method.from-8"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(t: T) -> T</h4></section></summary><divclass="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Into%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><ahref="#impl-Into%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T<divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="../struct.Id.html"title="struct clap::Id">Id</a>>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_resettable-1"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#209">source</a><ahref="#method.into_resettable-1"class="anchor">§</a><h4class="code-header">fn <ahref="trait.IntoResettable.html#tymethod.into_resettable"class="fn">into_resettable</a>(self) -><aclass="enum"href="enum.Resettable.html"title="enum clap::builder::Resettable">Resettable</a><<aclass="struct"href="../struct.Id.html"title="struct clap::Id">Id</a>></h4></section></summary><divclass='docblock'>Convert to the intended resettable type</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-IntoResettable%3COsStr%3E-for-I"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#196">source</a><ahref="#impl-IntoResettable%3COsStr%3E-for-I"class="anchor">§</a><h3class="code-header">impl<I><aclass="trait"href="trait.IntoResettable.html"title="trait clap::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.OsStr.html"title="struct clap::builder::OsStr">OsStr</a>> for I<divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="struct.OsStr.html"title="struct clap::builder::OsStr">OsStr</a>>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_resettable-2"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#197">source</a><ahref="#method.into_resettable-2"class="anchor">§</a><h4class="code-header">fn <ahref="trait.IntoResettable.html#tymethod.into_resettable"class="fn">into_resettable</a>(self) -><aclass="enum"href="enum.Resettable.html"title="enum clap::builder::Resettable">Resettable</a><<aclass="struct"href="struct.OsStr.html"title="struct clap::builder::OsStr">OsStr</a>></h4></section></summary><divclass='docblock'>Convert to the intended resettable type</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-IntoResettable%3CStr%3E-for-I"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#202">source</a><ahref="#impl-IntoResettable%3CStr%3E-for-I"class="anchor">§</a><h3class="code-header">impl<I><aclass="trait"href="trait.IntoResettable.html"title="trait clap::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>> for I<divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_resettable-4"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#203">source</a><ahref="#method.into_resettable-4"class="anchor">§</a><h4class="code-header">fn <ahref="trait.IntoResettable.html#tymethod.into_resettable"class="fn">into_resettable</a>(self) -><aclass="enum"href="enum.Resettable.html"title="enum clap::builder::Resettable">Resettable</a><<aclass="struct"href="struct.Str.html"title="struct clap::builder::Str">Str</a>></h4></section></summary><divclass='docblock'>Convert to the intended resettable type</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-IntoResettable%3CString%3E-for-I"class="impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#184">source</a><ahref="#impl-IntoResettable%3CString%3E-for-I"class="anchor">§</a><h3class="code-header">impl<I><aclass="trait"href="trait.IntoResettable.html"title="trait clap::builder::IntoResettable">IntoResettable</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>> for I<divclass="where">where
I: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.into_resettable-3"class="method trait-impl"><aclass="src rightside"href="../../src/clap_builder/builder/resettable.rs.html#185">source</a><ahref="#method.into_resettable-3"class="anchor">§</a><h4class="code-header">fn <ahref="trait.IntoResettable.html#tymethod.into_resettable"class="fn">into_resettable</a>(self) -><aclass="enum"href="enum.Resettable.html"title="enum clap::builder::Resettable">Resettable</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>></h4></section></summary><divclass='docblock'>Convert to the intended resettable type</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToString-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><ahref="#impl-ToString-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html"title="trait alloc::string::ToString">ToString</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html"title="trait core::fmt::Display">Display</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_string"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><ahref="#method.to_string"class="anchor">§</a><h4class="code-header">default fn <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string"class="fn">to_string</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass='docblock'>Converts the given value to a <code>String</code>. <ahref="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html>