Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 4e2dbb669434a7691662cb2f0ad38972 > files > 12014

rust-doc-1.28.0-1.mga6.armv7hl.rpm

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `AsciiExt` trait in crate `std`."><meta name="keywords" content="rust, rustlang, rust-lang, AsciiExt"><title>std::ascii::AsciiExt - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a><p class='location'>Trait AsciiExt</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Owned">Owned</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.is_ascii">is_ascii</a><a href="#tymethod.to_ascii_uppercase">to_ascii_uppercase</a><a href="#tymethod.to_ascii_lowercase">to_ascii_lowercase</a><a href="#tymethod.eq_ignore_ascii_case">eq_ignore_ascii_case</a><a href="#tymethod.make_ascii_uppercase">make_ascii_uppercase</a><a href="#tymethod.make_ascii_lowercase">make_ascii_lowercase</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.is_ascii_alphabetic">is_ascii_alphabetic</a><a href="#method.is_ascii_uppercase">is_ascii_uppercase</a><a href="#method.is_ascii_lowercase">is_ascii_lowercase</a><a href="#method.is_ascii_alphanumeric">is_ascii_alphanumeric</a><a href="#method.is_ascii_digit">is_ascii_digit</a><a href="#method.is_ascii_hexdigit">is_ascii_hexdigit</a><a href="#method.is_ascii_punctuation">is_ascii_punctuation</a><a href="#method.is_ascii_graphic">is_ascii_graphic</a><a href="#method.is_ascii_whitespace">is_ascii_whitespace</a><a href="#method.is_ascii_control">is_ascii_control</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>ascii</a></p><script>window.sidebarCurrent = {name: 'AsciiExt', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>std</a>::<wbr><a href='index.html'>ascii</a>::<wbr><a class="trait" href=''>AsciiExt</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/std/ascii.rs.html#56-311' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust trait'>pub trait AsciiExt {
    type <a href='#associatedtype.Owned' class="type">Owned</a>;
    fn <a href='#tymethod.is_ascii' class='fnname'>is_ascii</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a>;
<div class='item-spacer'></div>    fn <a href='#tymethod.to_ascii_uppercase' class='fnname'>to_ascii_uppercase</a>(&amp;self) -&gt; Self::<a class="type" href="../../std/ascii/trait.AsciiExt.html#associatedtype.Owned" title="type std::ascii::AsciiExt::Owned">Owned</a>;
<div class='item-spacer'></div>    fn <a href='#tymethod.to_ascii_lowercase' class='fnname'>to_ascii_lowercase</a>(&amp;self) -&gt; Self::<a class="type" href="../../std/ascii/trait.AsciiExt.html#associatedtype.Owned" title="type std::ascii::AsciiExt::Owned">Owned</a>;
<div class='item-spacer'></div>    fn <a href='#tymethod.eq_ignore_ascii_case' class='fnname'>eq_ignore_ascii_case</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a>;
<div class='item-spacer'></div>    fn <a href='#tymethod.make_ascii_uppercase' class='fnname'>make_ascii_uppercase</a>(&amp;mut self);
<div class='item-spacer'></div>    fn <a href='#tymethod.make_ascii_lowercase' class='fnname'>make_ascii_lowercase</a>(&amp;mut self);

    fn <a href='#method.is_ascii_alphabetic' class='fnname'>is_ascii_alphabetic</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_uppercase' class='fnname'>is_ascii_uppercase</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_lowercase' class='fnname'>is_ascii_lowercase</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_alphanumeric' class='fnname'>is_ascii_alphanumeric</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_digit' class='fnname'>is_ascii_digit</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_hexdigit' class='fnname'>is_ascii_hexdigit</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_punctuation' class='fnname'>is_ascii_punctuation</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_graphic' class='fnname'>is_ascii_graphic</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_whitespace' class='fnname'>is_ascii_whitespace</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div>    fn <a href='#method.is_ascii_control' class='fnname'>is_ascii_control</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a> { ... }
}</pre></div><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Extension methods for ASCII-subset only operations.</p>
<p>Be aware that operations on seemingly non-ASCII characters can sometimes
have unexpected results. Consider this example:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">ascii</span>::<span class="ident">AsciiExt</span>;

<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">AsciiExt</span>::<span class="ident">to_ascii_uppercase</span>(<span class="string">&quot;café&quot;</span>), <span class="string">&quot;CAFÉ&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">AsciiExt</span>::<span class="ident">to_ascii_uppercase</span>(<span class="string">&quot;café&quot;</span>), <span class="string">&quot;CAFé&quot;</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Aascii%3A%3AAsciiExt%3B%0A%0Aassert_eq!(AsciiExt%3A%3Ato_ascii_uppercase(%22cafe%CC%81%22)%2C%20%22CAFE%CC%81%22)%3B%0Aassert_eq!(AsciiExt%3A%3Ato_ascii_uppercase(%22caf%C3%A9%22)%2C%20%22CAF%C3%A9%22)%3B%0A%7D">Run</a></pre>
<p>In the first example, the lowercased string is represented <code>&quot;cafe\u{301}&quot;</code>
(the last character is an acute accent <a href="https://en.wikipedia.org/wiki/Combining_character">combining character</a>). Unlike the
other characters in the string, the combining character will not get mapped
to an uppercase variant, resulting in <code>&quot;CAFE\u{301}&quot;</code>. In the second
example, the lowercased string is represented <code>&quot;caf\u{e9}&quot;</code> (the last
character is a single Unicode character representing an 'e' with an acute
accent). Since the last character is defined outside the scope of ASCII,
it will not get mapped to an uppercase variant, resulting in <code>&quot;CAF\u{e9}&quot;</code>.</p>
</div>
            <h2 id='associated-types' class='small-section-header'>
              Associated Types<a href='#associated-types' class='anchor'></a>
            </h2>
            <div class='methods'>
        <h3 id='associatedtype.Owned' class='method'><span id='Owned.t' class='invisible'><code>type <a href='#associatedtype.Owned' class="type">Owned</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Container type for copied ASCII characters.</p>
</div></div>
            <h2 id='required-methods' class='small-section-header'>
              Required Methods<a href='#required-methods' class='anchor'></a>
            </h2>
            <div class='methods'>
        <h3 id='tymethod.is_ascii' class='method'><span id='is_ascii.v' class='invisible'><code>fn <a href='#tymethod.is_ascii' class='fnname'>is_ascii</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Checks if the value is within the ASCII range.</p>
<h1 id="note" class="section-header"><a href="#note">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='tymethod.to_ascii_uppercase' class='method'><span id='to_ascii_uppercase.v' class='invisible'><code>fn <a href='#tymethod.to_ascii_uppercase' class='fnname'>to_ascii_uppercase</a>(&amp;self) -&gt; Self::<a class="type" href="../../std/ascii/trait.AsciiExt.html#associatedtype.Owned" title="type std::ascii::AsciiExt::Owned">Owned</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Makes a copy of the value in its ASCII upper case equivalent.</p>
<p>ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
but non-ASCII letters are unchanged.</p>
<p>To uppercase the value in-place, use <a href="#tymethod.make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p>
<p>To uppercase ASCII characters in addition to non-ASCII characters, use
<a href="../primitive.str.html#method.to_uppercase"><code>str::to_uppercase</code></a>.</p>
<h1 id="note-1" class="section-header"><a href="#note-1">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='tymethod.to_ascii_lowercase' class='method'><span id='to_ascii_lowercase.v' class='invisible'><code>fn <a href='#tymethod.to_ascii_lowercase' class='fnname'>to_ascii_lowercase</a>(&amp;self) -&gt; Self::<a class="type" href="../../std/ascii/trait.AsciiExt.html#associatedtype.Owned" title="type std::ascii::AsciiExt::Owned">Owned</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Makes a copy of the value in its ASCII lower case equivalent.</p>
<p>ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
but non-ASCII letters are unchanged.</p>
<p>To lowercase the value in-place, use <a href="#tymethod.make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p>
<p>To lowercase ASCII characters in addition to non-ASCII characters, use
<a href="../primitive.str.html#method.to_lowercase"><code>str::to_lowercase</code></a>.</p>
<h1 id="note-2" class="section-header"><a href="#note-2">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='tymethod.eq_ignore_ascii_case' class='method'><span id='eq_ignore_ascii_case.v' class='invisible'><code>fn <a href='#tymethod.eq_ignore_ascii_case' class='fnname'>eq_ignore_ascii_case</a>(&amp;self, other: <a class="primitive" href="../primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Checks that two values are an ASCII case-insensitive match.</p>
<p>Same as <code>to_ascii_lowercase(a) == to_ascii_lowercase(b)</code>,
but without allocating and copying temporaries.</p>
<h1 id="note-3" class="section-header"><a href="#note-3">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='tymethod.make_ascii_uppercase' class='method'><span id='make_ascii_uppercase.v' class='invisible'><code>fn <a href='#tymethod.make_ascii_uppercase' class='fnname'>make_ascii_uppercase</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Converts this type to its ASCII upper case equivalent in-place.</p>
<p>ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
but non-ASCII letters are unchanged.</p>
<p>To return a new uppercased value without modifying the existing one, use
<a href="#tymethod.to_ascii_uppercase"><code>to_ascii_uppercase</code></a>.</p>
<h1 id="note-4" class="section-header"><a href="#note-4">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='tymethod.make_ascii_lowercase' class='method'><span id='make_ascii_lowercase.v' class='invisible'><code>fn <a href='#tymethod.make_ascii_lowercase' class='fnname'>make_ascii_lowercase</a>(&amp;mut self)</code><div class='since' title='Stable since Rust version 1.9.0'>1.9.0</div></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div></div><div class='docblock'><p>Converts this type to its ASCII lower case equivalent in-place.</p>
<p>ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
but non-ASCII letters are unchanged.</p>
<p>To return a new lowercased value without modifying the existing one, use
<a href="#tymethod.to_ascii_lowercase"><code>to_ascii_lowercase</code></a>.</p>
<h1 id="note-5" class="section-header"><a href="#note-5">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div></div>
            <h2 id='provided-methods' class='small-section-header'>
              Provided Methods<a href='#provided-methods' class='anchor'></a>
            </h2>
            <div class='methods'>
        <h3 id='method.is_ascii_alphabetic' class='method'><span id='is_ascii_alphabetic.v' class='invisible'><code>fn <a href='#method.is_ascii_alphabetic' class='fnname'>is_ascii_alphabetic</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII alphabetic character:
U+0041 'A' ... U+005A 'Z' or U+0061 'a' ... U+007A 'z'.
For strings, true if all characters in the string are
ASCII alphabetic.</p>
<h1 id="note-6" class="section-header"><a href="#note-6">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_uppercase' class='method'><span id='is_ascii_uppercase.v' class='invisible'><code>fn <a href='#method.is_ascii_uppercase' class='fnname'>is_ascii_uppercase</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII uppercase character:
U+0041 'A' ... U+005A 'Z'.
For strings, true if all characters in the string are
ASCII uppercase.</p>
<h1 id="note-7" class="section-header"><a href="#note-7">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_lowercase' class='method'><span id='is_ascii_lowercase.v' class='invisible'><code>fn <a href='#method.is_ascii_lowercase' class='fnname'>is_ascii_lowercase</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII lowercase character:
U+0061 'a' ... U+007A 'z'.
For strings, true if all characters in the string are
ASCII lowercase.</p>
<h1 id="note-8" class="section-header"><a href="#note-8">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_alphanumeric' class='method'><span id='is_ascii_alphanumeric.v' class='invisible'><code>fn <a href='#method.is_ascii_alphanumeric' class='fnname'>is_ascii_alphanumeric</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII alphanumeric character:
U+0041 'A' ... U+005A 'Z', U+0061 'a' ... U+007A 'z', or
U+0030 '0' ... U+0039 '9'.
For strings, true if all characters in the string are
ASCII alphanumeric.</p>
<h1 id="note-9" class="section-header"><a href="#note-9">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_digit' class='method'><span id='is_ascii_digit.v' class='invisible'><code>fn <a href='#method.is_ascii_digit' class='fnname'>is_ascii_digit</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII decimal digit:
U+0030 '0' ... U+0039 '9'.
For strings, true if all characters in the string are
ASCII digits.</p>
<h1 id="note-10" class="section-header"><a href="#note-10">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_hexdigit' class='method'><span id='is_ascii_hexdigit.v' class='invisible'><code>fn <a href='#method.is_ascii_hexdigit' class='fnname'>is_ascii_hexdigit</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII hexadecimal digit:
U+0030 '0' ... U+0039 '9', U+0041 'A' ... U+0046 'F', or
U+0061 'a' ... U+0066 'f'.
For strings, true if all characters in the string are
ASCII hex digits.</p>
<h1 id="note-11" class="section-header"><a href="#note-11">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_punctuation' class='method'><span id='is_ascii_punctuation.v' class='invisible'><code>fn <a href='#method.is_ascii_punctuation' class='fnname'>is_ascii_punctuation</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII punctuation character:</p>
<p>U+0021 ... U+002F <code>! &quot; # $ % &amp; ' ( ) * + , - . /</code>
U+003A ... U+0040 <code>: ; &lt; = &gt; ? @</code>
U+005B ... U+0060 <code>[ \\ ] ^ _ `</code>
U+007B ... U+007E <code>{ | } ~</code></p>
<p>For strings, true if all characters in the string are
ASCII punctuation.</p>
<h1 id="note-12" class="section-header"><a href="#note-12">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_graphic' class='method'><span id='is_ascii_graphic.v' class='invisible'><code>fn <a href='#method.is_ascii_graphic' class='fnname'>is_ascii_graphic</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII graphic character:
U+0021 '!' ... U+007E '~'.
For strings, true if all characters in the string are
ASCII graphic characters.</p>
<h1 id="note-13" class="section-header"><a href="#note-13">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_whitespace' class='method'><span id='is_ascii_whitespace.v' class='invisible'><code>fn <a href='#method.is_ascii_whitespace' class='fnname'>is_ascii_whitespace</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII whitespace character:
U+0020 SPACE, U+0009 HORIZONTAL TAB, U+000A LINE FEED,
U+000C FORM FEED, or U+000D CARRIAGE RETURN.
For strings, true if all characters in the string are
ASCII whitespace.</p>
<p>Rust uses the WhatWG Infra Standard's <a href="https://infra.spec.whatwg.org/#ascii-whitespace">definition of ASCII
whitespace</a>.  There are several other definitions in
wide use.  For instance, <a href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01">the POSIX locale</a> includes
U+000B VERTICAL TAB as well as all the above characters,
but—from the very same specification—<a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05">the default rule for
&quot;field splitting&quot; in the Bourne shell</a> considers <em>only</em>
SPACE, HORIZONTAL TAB, and LINE FEED as whitespace.</p>
<p>If you are writing a program that will process an existing
file format, check what that format's definition of whitespace is
before using this function.</p>
<h1 id="note-14" class="section-header"><a href="#note-14">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div><h3 id='method.is_ascii_control' class='method'><span id='is_ascii_control.v' class='invisible'><code>fn <a href='#method.is_ascii_control' class='fnname'>is_ascii_control</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a></code></span></h3><div class='stability'><div class='stab deprecated'>Deprecated since 1.26.0<p>: use inherent methods instead</p>
</div><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>ascii_ctype </code><a href="https://github.com/rust-lang/rust/issues/39658">#39658</a>)</div></div><div class='docblock'><p>Checks if the value is an ASCII control character:
U+0000 NUL ... U+001F UNIT SEPARATOR, or U+007F DELETE.
Note that most ASCII whitespace characters are control
characters, but SPACE is not.</p>
<h1 id="note-15" class="section-header"><a href="#note-15">Note</a></h1>
<p>This method will be deprecated in favor of the identically-named
inherent methods on <code>u8</code>, <code>char</code>, <code>[u8]</code> and <code>str</code>.</p>
</div></div>
        <h2 id='implementors' class='small-section-header'>
          Implementors<a href='#implementors' class='anchor'></a>
        </h2>
        <ul class='item-list' id='implementors-list'>
    <li><table class='table-display'><tbody><tr><td><code>impl AsciiExt for <a class="primitive" href="../primitive.u8.html">u8</a><span class="where fmt-newline">  type <a href='#associatedtype.Owned' class="type">Owned</a> = <a class="primitive" href="../primitive.u8.html">u8</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../src/std/ascii.rs.html#371-376' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl AsciiExt for <a class="primitive" href="../primitive.char.html">char</a><span class="where fmt-newline">  type <a href='#associatedtype.Owned' class="type">Owned</a> = <a class="primitive" href="../primitive.char.html">char</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../src/std/ascii.rs.html#380-385' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl AsciiExt for <a class="primitive" href="../primitive.slice.html">[</a><a class="primitive" href="../primitive.u8.html">u8</a><a class="primitive" href="../primitive.slice.html">]</a><span class="where fmt-newline">  type <a href='#associatedtype.Owned' class="type">Owned</a> = <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;<a class="primitive" href="../primitive.u8.html">u8</a>&gt;;</span></code><td><div class='out-of-band'><a class='srclink' href='../../src/std/ascii.rs.html#389-443' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
<li><table class='table-display'><tbody><tr><td><code>impl AsciiExt for <a class="primitive" href="../primitive.str.html">str</a><span class="where fmt-newline">  type <a href='#associatedtype.Owned' class="type">Owned</a> = <a class="struct" href="../../std/string/struct.String.html" title="struct std::string::String">String</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../../src/std/ascii.rs.html#447-501' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
</ul><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
                         src="../../implementors/std/ascii/trait.AsciiExt.js">
                 </script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "std";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>