aboutsummaryrefslogtreecommitdiff
path: root/openssl/x509/struct.SslString.html
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/x509/struct.SslString.html')
-rw-r--r--openssl/x509/struct.SslString.html1170
1 files changed, 1170 insertions, 0 deletions
diff --git a/openssl/x509/struct.SslString.html b/openssl/x509/struct.SslString.html
new file mode 100644
index 0000000..7d907a3
--- /dev/null
+++ b/openssl/x509/struct.SslString.html
@@ -0,0 +1,1170 @@
+<!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 `SslString` struct in crate `openssl`.">
+ <meta name="keywords" content="rust, rustlang, rust-lang, SslString">
+
+ <title>openssl::x509::SslString - Rust</title>
+
+ <link rel="stylesheet" type="text/css" href="../../main.css">
+
+
+
+</head>
+<body class="rustdoc">
+ <!--[if lte IE 8]>
+ <div class="warning">
+ This old browser is unsupported and will most likely display funky
+ things.
+ </div>
+ <![endif]-->
+
+
+
+ <section class="sidebar">
+
+ <p class='location'><a href='../index.html'>openssl</a>::<wbr><a href='index.html'>x509</a></p><script>window.sidebarCurrent = {name: 'SslString', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
+ </section>
+
+ <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">
+ </div>
+ </form>
+ </nav>
+
+ <section id='main' class="content struct">
+<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>openssl</a>::<wbr><a href='index.html'>x509</a>::<wbr><a class='struct' href=''>SslString</a></span><span class='out-of-band'><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 id='src-13896' class='srclink' href='../../src/openssl/x509/mod.rs.html#27-29' title='goto source code'>[src]</a></span></h1>
+<pre class='rust struct'>pub struct SslString {
+ // some fields omitted
+}</pre><h2 id='deref-methods'>Methods from <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a>&lt;Target=<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>&gt;</h2><div class='impl-items'><h4 id='method.len' class='method'><code>fn <a href='#method.len' class='fnname'>len</a>(&amp;self) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
+<div class='docblock'><p>Returns the length of <code>self</code> in bytes.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;foo&quot;</span>.<span class='ident'>len</span>(), <span class='number'>3</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;ƒoo&quot;</span>.<span class='ident'>len</span>(), <span class='number'>4</span>); <span class='comment'>// fancy f!</span>
+</pre>
+</div><h4 id='method.is_empty' class='method'><code>fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
+<div class='docblock'><p>Returns true if this slice has a length of zero bytes.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='string'>&quot;&quot;</span>.<span class='ident'>is_empty</span>());
+</pre>
+</div><h4 id='method.width' class='method'><code>fn <a href='#method.width' class='fnname'>width</a>(&amp;self, is_cjk: <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-width</code> library instead</p>
+</em></div><div class='docblock'><p>Returns a string&#39;s displayed width in columns.</p>
+
+<p>Control characters have zero width.</p>
+
+<p><code>is_cjk</code> determines behavior for characters in the Ambiguous category:
+if <code>is_cjk</code> is
+<code>true</code>, these are 2 columns wide; otherwise, they are 1.
+In CJK locales, <code>is_cjk</code> should be
+<code>true</code>, else it should be <code>false</code>.
+<a href="http://www.unicode.org/reports/tr11/">Unicode Standard Annex #11</a>
+recommends that these
+characters be treated as 1 column (i.e., <code>is_cjk = false</code>) if the
+locale is unknown.</p>
+</div><h4 id='method.is_char_boundary' class='method'><code>fn <a href='#method.is_char_boundary' class='fnname'>is_char_boundary</a>(&amp;self, index: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: it is unclear whether this method pulls its weight with the existence of the char_indices iterator or this method may want to be replaced with checked slicing</p>
+</em></div><div class='docblock'><p>Checks that <code>index</code>-th byte lies at the start and/or end of a
+UTF-8 code point sequence.</p>
+
+<p>The start and end of the string (when <code>index == self.len()</code>) are
+considered to be
+boundaries.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>Panics if <code>index</code> is greater than <code>self.len()</code>.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>is_char_boundary</span>(<span class='number'>0</span>));
+<span class='comment'>// start of `老`</span>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>is_char_boundary</span>(<span class='number'>6</span>));
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>is_char_boundary</span>(<span class='ident'>s</span>.<span class='ident'>len</span>()));
+
+<span class='comment'>// second byte of `ö`</span>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>s</span>.<span class='ident'>is_char_boundary</span>(<span class='number'>2</span>));
+
+<span class='comment'>// third byte of `老`</span>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>s</span>.<span class='ident'>is_char_boundary</span>(<span class='number'>8</span>));
+</pre>
+</div><h4 id='method.as_bytes' class='method'><code>fn <a href='#method.as_bytes' class='fnname'>as_bytes</a>(&amp;self) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.slice.html'>&amp;[</a><a href='http://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a href='http://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code></h4>
+<div class='docblock'><p>Converts <code>self</code> to a byte slice.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;bors&quot;</span>.<span class='ident'>as_bytes</span>(), <span class='string'>b&quot;bors&quot;</span>);
+</pre>
+</div><h4 id='method.as_ptr' class='method'><code>fn <a href='#method.as_ptr' class='fnname'>as_ptr</a>(&amp;self) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.pointer.html'>*const <a href='http://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a></a></code></h4>
+<div class='docblock'><p>Returns a raw pointer to the <code>&amp;str</code>&#39;s buffer.</p>
+
+<p>The caller must ensure that the string outlives this pointer, and
+that it is not
+reallocated (e.g. by pushing to the string).</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Hello&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>p</span> <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>as_ptr</span>();
+</pre>
+</div><h4 id='method.slice_unchecked' class='method'><code>unsafe fn <a href='#method.slice_unchecked' class='fnname'>slice_unchecked</a>(&amp;self, begin: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, end: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+<div class='docblock'><p>Takes a bytewise slice from a string.</p>
+
+<p>Returns the substring from [<code>begin</code>..<code>end</code>).</p>
+
+<h1 id="unsafety" class='section-header'><a
+ href="#unsafety">Unsafety</a></h1>
+<p>Caller must check both UTF-8 character boundaries and the boundaries
+of the entire slice as
+well.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+
+<span class='kw'>unsafe</span> {
+ <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>slice_unchecked</span>(<span class='number'>0</span>, <span class='number'>21</span>), <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>);
+}
+</pre>
+</div><h4 id='method.slice_chars' class='method'><code>fn <a href='#method.slice_chars' class='fnname'>slice_chars</a>(&amp;self, begin: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, end: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: may have yet to prove its worth</p>
+</em></div><div class='docblock'><p>Returns a slice of the string from the character range [<code>begin</code>..<code>end</code>).</p>
+
+<p>That is, start at the <code>begin</code>-th code point of the string and continue
+to the <code>end</code>-th code point. This does not detect or handle edge cases
+such as leaving a combining character as the first code point of the
+string.</p>
+
+<p>Due to the design of UTF-8, this operation is <code>O(end)</code>. Use slicing
+syntax if you want to use byte indices rather than codepoint indices.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>Panics if <code>begin</code> &gt; <code>end</code> or the either <code>begin</code> or <code>end</code> are beyond the
+last character of the string.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>slice_chars</span>(<span class='number'>0</span>, <span class='number'>4</span>), <span class='string'>&quot;Löwe&quot;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>slice_chars</span>(<span class='number'>5</span>, <span class='number'>7</span>), <span class='string'>&quot;老虎&quot;</span>);
+</pre>
+</div><h4 id='method.char_range_at' class='method'><code>fn <a href='#method.char_range_at' class='fnname'>char_range_at</a>(&amp;self, start: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.CharRange.html' title='core::str::CharRange'>CharRange</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: often replaced by char_indices, this method may be removed in favor of just char_at() or eventually removed altogether</p>
+</em></div><div class='docblock'><p>Given a byte position, return the next char and its index.</p>
+
+<p>This can be used to iterate over the Unicode characters of a string.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>If <code>i</code> is greater than or equal to the length of the string.
+If <code>i</code> is not the index of the beginning of a valid UTF-8 character.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>This example manually iterates through the characters of a string;
+this should normally be
+done by <code>.chars()</code> or <code>.char_indices()</code>.</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>str</span>::<span class='ident'>CharRange</span>;
+
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;中华Việt Nam&quot;</span>;
+<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>i</span> <span class='op'>=</span> <span class='number'>0</span>;
+<span class='kw'>while</span> <span class='ident'>i</span> <span class='op'>&lt;</span> <span class='ident'>s</span>.<span class='ident'>len</span>() {
+ <span class='kw'>let</span> <span class='ident'>CharRange</span> {<span class='ident'>ch</span>, <span class='ident'>next</span>} <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>char_range_at</span>(<span class='ident'>i</span>);
+ <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}: {}&quot;</span>, <span class='ident'>i</span>, <span class='ident'>ch</span>);
+ <span class='ident'>i</span> <span class='op'>=</span> <span class='ident'>next</span>;
+}
+</pre>
+
+<p>This outputs:</p>
+
+<pre><code class="language-text">0: 中
+3: 华
+6: V
+7: i
+8: ệ
+11: t
+12:
+13: N
+14: a
+15: m
+</code></pre>
+</div><h4 id='method.char_range_at_reverse' class='method'><code>fn <a href='#method.char_range_at_reverse' class='fnname'>char_range_at_reverse</a>(&amp;self, start: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.CharRange.html' title='core::str::CharRange'>CharRange</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: often replaced by char_indices, this method may be removed in favor of just char_at_reverse() or eventually removed altogether</p>
+</em></div><div class='docblock'><p>Given a byte position, return the previous <code>char</code> and its position.</p>
+
+<p>This function can be used to iterate over a Unicode string in reverse.</p>
+
+<p>Returns 0 for next index if called on start index 0.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>If <code>i</code> is greater than the length of the string.
+If <code>i</code> is not an index following a valid UTF-8 character.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>This example manually iterates through the characters of a string;
+this should normally be
+done by <code>.chars().rev()</code> or <code>.char_indices()</code>.</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>str</span>::<span class='ident'>CharRange</span>;
+
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;中华Việt Nam&quot;</span>;
+<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>i</span> <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>len</span>();
+<span class='kw'>while</span> <span class='ident'>i</span> <span class='op'>&gt;</span> <span class='number'>0</span> {
+ <span class='kw'>let</span> <span class='ident'>CharRange</span> {<span class='ident'>ch</span>, <span class='ident'>next</span>} <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>char_range_at_reverse</span>(<span class='ident'>i</span>);
+ <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}: {}&quot;</span>, <span class='ident'>i</span>, <span class='ident'>ch</span>);
+ <span class='ident'>i</span> <span class='op'>=</span> <span class='ident'>next</span>;
+}
+</pre>
+
+<p>This outputs:</p>
+
+<pre><code class="language-text">16: m
+15: a
+14: N
+13:
+12: t
+11: ệ
+8: i
+7: V
+6: 华
+3: 中
+</code></pre>
+</div><h4 id='method.char_at' class='method'><code>fn <a href='#method.char_at' class='fnname'>char_at</a>(&amp;self, i: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: frequently replaced by the chars() iterator, this method may be removed or possibly renamed in the future; it is normally replaced by chars/char_indices iterators or by getting the first char from a subslice</p>
+</em></div><div class='docblock'><p>Given a byte position, return the <code>char</code> at that position.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>If <code>i</code> is greater than or equal to the length of the string.
+If <code>i</code> is not the index of the beginning of a valid UTF-8 character.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;abπc&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>char_at</span>(<span class='number'>1</span>), <span class='string'>&#39;b&#39;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>char_at</span>(<span class='number'>2</span>), <span class='string'>&#39;π&#39;</span>);
+</pre>
+</div><h4 id='method.char_at_reverse' class='method'><code>fn <a href='#method.char_at_reverse' class='fnname'>char_at_reverse</a>(&amp;self, i: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: see char_at for more details, but reverse semantics are also somewhat unclear, especially with which cases generate panics</p>
+</em></div><div class='docblock'><p>Given a byte position, return the <code>char</code> at that position, counting
+from the end.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>If <code>i</code> is greater than the length of the string.
+If <code>i</code> is not an index following a valid UTF-8 character.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;abπc&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>char_at_reverse</span>(<span class='number'>1</span>), <span class='string'>&#39;a&#39;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>char_at_reverse</span>(<span class='number'>2</span>), <span class='string'>&#39;b&#39;</span>);
+</pre>
+</div><h4 id='method.slice_shift_char' class='method'><code>fn <a href='#method.slice_shift_char' class='fnname'>slice_shift_char</a>(&amp;self) -&gt; <a class='enum' href='http://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(<a href='http://doc.rust-lang.org/nightly/std/primitive.char.html'>char</a>, &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>)</a>&gt;</code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: awaiting conventions about shifting and slices and may not be warranted with the existence of the chars and/or char_indices iterators</p>
+</em></div><div class='docblock'><p>Retrieves the first character from a <code>&amp;str</code> and returns it.</p>
+
+<p>This does not allocate a new string; instead, it returns a slice that
+points one character
+beyond the character that was shifted.</p>
+
+<p>If the slice does not contain any characters, None is returned instead.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+<span class='kw'>let</span> (<span class='ident'>c</span>, <span class='ident'>s1</span>) <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>slice_shift_char</span>().<span class='ident'>unwrap</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>c</span>, <span class='string'>&#39;L&#39;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s1</span>, <span class='string'>&quot;öwe 老虎 Léopard&quot;</span>);
+
+<span class='kw'>let</span> (<span class='ident'>c</span>, <span class='ident'>s2</span>) <span class='op'>=</span> <span class='ident'>s1</span>.<span class='ident'>slice_shift_char</span>().<span class='ident'>unwrap</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>c</span>, <span class='string'>&#39;ö&#39;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s2</span>, <span class='string'>&quot;we 老虎 Léopard&quot;</span>);
+</pre>
+</div><h4 id='method.split_at' class='method'><code>fn <a href='#method.split_at' class='fnname'>split_at</a>(&amp;self, mid: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(&amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>)</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: library is unlikely to be stabilized with the current layout and name, use std::collections instead</p>
+</em></div><div class='docblock'><p>Divide one string slice into two at an index.</p>
+
+<p>The index <code>mid</code> is a byte offset from the start of the string
+that must be on a character boundary.</p>
+
+<p>Return slices <code>&amp;self[..mid]</code> and <code>&amp;self[mid..]</code>.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>Panics if <code>mid</code> is beyond the last character of the string,
+or if it is not on a character boundary.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>first_space</span> <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>find</span>(<span class='string'>&#39; &#39;</span>).<span class='ident'>unwrap_or</span>(<span class='ident'>s</span>.<span class='ident'>len</span>());
+<span class='kw'>let</span> (<span class='ident'>a</span>, <span class='ident'>b</span>) <span class='op'>=</span> <span class='ident'>s</span>.<span class='ident'>split_at</span>(<span class='ident'>first_space</span>);
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>a</span>, <span class='string'>&quot;Löwe&quot;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>b</span>, <span class='string'>&quot; 老虎 Léopard&quot;</span>);
+</pre>
+</div><h4 id='method.chars' class='method'><code>fn <a href='#method.chars' class='fnname'>chars</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.Chars.html' title='core::str::Chars'>Chars</a></code></h4>
+<div class='docblock'><p>An iterator over the codepoints of <code>self</code>.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>char</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc åäö&quot;</span>.<span class='ident'>chars</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&#39;a&#39;</span>, <span class='string'>&#39;b&#39;</span>, <span class='string'>&#39;c&#39;</span>, <span class='string'>&#39; &#39;</span>, <span class='string'>&#39;å&#39;</span>, <span class='string'>&#39;ä&#39;</span>, <span class='string'>&#39;ö&#39;</span>]);
+</pre>
+</div><h4 id='method.char_indices' class='method'><code>fn <a href='#method.char_indices' class='fnname'>char_indices</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.CharIndices.html' title='core::str::CharIndices'>CharIndices</a></code></h4>
+<div class='docblock'><p>An iterator over the characters of <code>self</code> and their byte offsets.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>char</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc&quot;</span>.<span class='ident'>char_indices</span>().<span class='ident'>collect</span>();
+<span class='kw'>let</span> <span class='ident'>b</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[(<span class='number'>0</span>, <span class='string'>&#39;a&#39;</span>), (<span class='number'>1</span>, <span class='string'>&#39;b&#39;</span>), (<span class='number'>2</span>, <span class='string'>&#39;c&#39;</span>)];
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, <span class='ident'>b</span>);
+</pre>
+</div><h4 id='method.bytes' class='method'><code>fn <a href='#method.bytes' class='fnname'>bytes</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.Bytes.html' title='core::str::Bytes'>Bytes</a></code></h4>
+<div class='docblock'><p>An iterator over the bytes of <code>self</code>.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='ident'>u8</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;bors&quot;</span>.<span class='ident'>bytes</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, <span class='string'>b&quot;bors&quot;</span>.<span class='ident'>to_vec</span>());
+</pre>
+</div><h4 id='method.split_whitespace' class='method'><code>fn <a href='#method.split_whitespace' class='fnname'>split_whitespace</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/rustc_unicode/u_str/struct.SplitWhitespace.html' title='rustc_unicode::u_str::SplitWhitespace'>SplitWhitespace</a></code></h4>
+<div class='docblock'><p>An iterator over the non-empty substrings of <code>self</code> which contain no whitespace,
+and which are separated by any amount of whitespace.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>some_words</span> <span class='op'>=</span> <span class='string'>&quot; Mary had\ta little \n\t lamb&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>some_words</span>.<span class='ident'>split_whitespace</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;Mary&quot;</span>, <span class='string'>&quot;had&quot;</span>, <span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;little&quot;</span>, <span class='string'>&quot;lamb&quot;</span>]);
+</pre>
+</div><h4 id='method.words' class='method'><code>fn <a href='#method.words' class='fnname'>words</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/rustc_unicode/u_str/struct.SplitWhitespace.html' title='rustc_unicode::u_str::SplitWhitespace'>SplitWhitespace</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.1.0<p>: words() will be removed. Use split_whitespace() instead</p>
+</em></div><div class='docblock'><p>An iterator over the non-empty substrings of <code>self</code> which contain no whitespace,
+and which are separated by any amount of whitespace.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>some_words</span> <span class='op'>=</span> <span class='string'>&quot; Mary had\ta little \n\t lamb&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>some_words</span>.<span class='ident'>words</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;Mary&quot;</span>, <span class='string'>&quot;had&quot;</span>, <span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;little&quot;</span>, <span class='string'>&quot;lamb&quot;</span>]);
+</pre>
+</div><h4 id='method.lines' class='method'><code>fn <a href='#method.lines' class='fnname'>lines</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.Lines.html' title='core::str::Lines'>Lines</a></code></h4>
+<div class='docblock'><p>An iterator over the lines of a string, separated by <code>\n</code>.</p>
+
+<p>This does not include the empty string after a trailing <code>\n</code>.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>four_lines</span> <span class='op'>=</span> <span class='string'>&quot;foo\nbar\n\nbaz&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>four_lines</span>.<span class='ident'>lines</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;baz&quot;</span>]);
+</pre>
+
+<p>Leaving off the trailing character:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>four_lines</span> <span class='op'>=</span> <span class='string'>&quot;foo\nbar\n\nbaz\n&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>four_lines</span>.<span class='ident'>lines</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;baz&quot;</span>]);
+</pre>
+</div><h4 id='method.lines_any' class='method'><code>fn <a href='#method.lines_any' class='fnname'>lines_any</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.LinesAny.html' title='core::str::LinesAny'>LinesAny</a></code></h4>
+<div class='docblock'><p>An iterator over the lines of a string, separated by either
+<code>\n</code> or <code>\r\n</code>.</p>
+
+<p>As with <code>.lines()</code>, this does not include an empty trailing line.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>four_lines</span> <span class='op'>=</span> <span class='string'>&quot;foo\r\nbar\n\r\nbaz&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>four_lines</span>.<span class='ident'>lines_any</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;baz&quot;</span>]);
+</pre>
+
+<p>Leaving off the trailing character:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>four_lines</span> <span class='op'>=</span> <span class='string'>&quot;foo\r\nbar\n\r\nbaz\n&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>four_lines</span>.<span class='ident'>lines_any</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;foo&quot;</span>, <span class='string'>&quot;bar&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;baz&quot;</span>]);
+</pre>
+</div><h4 id='method.nfd_chars' class='method'><code>fn <a href='#method.nfd_chars' class='fnname'>nfd_chars</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/str/struct.Decompositions.html' title='collections::str::Decompositions'>Decompositions</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-normalization</code> library instead</p>
+</em></div><div class='docblock'><p>Returns an iterator over the string in Unicode Normalization Form D
+(canonical decomposition).</p>
+</div><h4 id='method.nfkd_chars' class='method'><code>fn <a href='#method.nfkd_chars' class='fnname'>nfkd_chars</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/str/struct.Decompositions.html' title='collections::str::Decompositions'>Decompositions</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-normalization</code> library instead</p>
+</em></div><div class='docblock'><p>Returns an iterator over the string in Unicode Normalization Form KD
+(compatibility decomposition).</p>
+</div><h4 id='method.nfc_chars' class='method'><code>fn <a href='#method.nfc_chars' class='fnname'>nfc_chars</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/str/struct.Recompositions.html' title='collections::str::Recompositions'>Recompositions</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-normalization</code> library instead</p>
+</em></div><div class='docblock'><p>An Iterator over the string in Unicode Normalization Form C
+(canonical decomposition followed by canonical composition).</p>
+</div><h4 id='method.nfkc_chars' class='method'><code>fn <a href='#method.nfkc_chars' class='fnname'>nfkc_chars</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/str/struct.Recompositions.html' title='collections::str::Recompositions'>Recompositions</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-normalization</code> library instead</p>
+</em></div><div class='docblock'><p>An Iterator over the string in Unicode Normalization Form KC
+(compatibility decomposition followed by canonical composition).</p>
+</div><h4 id='method.graphemes' class='method'><code>fn <a href='#method.graphemes' class='fnname'>graphemes</a>(&amp;self, is_extended: <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/rustc_unicode/u_str/struct.Graphemes.html' title='rustc_unicode::u_str::Graphemes'>Graphemes</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-segmentation</code> library instead</p>
+</em></div><div class='docblock'><p>Returns an iterator over the <a href="http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries">grapheme clusters</a> of <code>self</code>.</p>
+
+<p>If <code>is_extended</code> is true, the iterator is over the
+<em>extended grapheme clusters</em>;
+otherwise, the iterator is over the <em>legacy grapheme clusters</em>.
+<a href="http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries">UAX#29</a>
+recommends extended grapheme cluster boundaries for general processing.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>gr1</span> <span class='op'>=</span> <span class='string'>&quot;a\u{310}e\u{301}o\u{308}\u{332}&quot;</span>.<span class='ident'>graphemes</span>(<span class='boolval'>true</span>).<span class='ident'>collect</span>::<span class='op'>&lt;</span><span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;&gt;</span>();
+<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&quot;a\u{310}&quot;</span>, <span class='string'>&quot;e\u{301}&quot;</span>, <span class='string'>&quot;o\u{308}\u{332}&quot;</span>];
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='ident'>gr1</span>[..], <span class='ident'>b</span>);
+
+<span class='kw'>let</span> <span class='ident'>gr2</span> <span class='op'>=</span> <span class='string'>&quot;a\r\nb🇷🇺🇸🇹&quot;</span>.<span class='ident'>graphemes</span>(<span class='boolval'>true</span>).<span class='ident'>collect</span>::<span class='op'>&lt;</span><span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;&gt;</span>();
+<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;\r\n&quot;</span>, <span class='string'>&quot;b&quot;</span>, <span class='string'>&quot;🇷🇺🇸🇹&quot;</span>];
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='ident'>gr2</span>[..], <span class='ident'>b</span>);
+</pre>
+</div><h4 id='method.grapheme_indices' class='method'><code>fn <a href='#method.grapheme_indices' class='fnname'>grapheme_indices</a>(&amp;self, is_extended: <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/rustc_unicode/u_str/struct.GraphemeIndices.html' title='rustc_unicode::u_str::GraphemeIndices'>GraphemeIndices</a></code></h4>
+<div class='stability'><em class='stab unstable deprecated'>Deprecated since 1.0.0<p>: use the crates.io <code>unicode-segmentation</code> library instead</p>
+</em></div><div class='docblock'><p>Returns an iterator over the grapheme clusters of <code>self</code> and their
+byte offsets. See
+<code>graphemes()</code> for more information.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>gr_inds</span> <span class='op'>=</span> <span class='string'>&quot;a̐éö̲\r\n&quot;</span>.<span class='ident'>grapheme_indices</span>(<span class='boolval'>true</span>).<span class='ident'>collect</span>::<span class='op'>&lt;</span><span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='kw-2'>&amp;</span><span class='ident'>str</span>)<span class='op'>&gt;&gt;</span>();
+<span class='kw'>let</span> <span class='ident'>b</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[(<span class='number'>0</span>, <span class='string'>&quot;a̐&quot;</span>), (<span class='number'>3</span>, <span class='string'>&quot;é&quot;</span>), (<span class='number'>6</span>, <span class='string'>&quot;ö̲&quot;</span>), (<span class='number'>11</span>, <span class='string'>&quot;\r\n&quot;</span>)];
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='kw-2'>&amp;</span><span class='ident'>gr_inds</span>[..], <span class='ident'>b</span>);
+</pre>
+</div><h4 id='method.utf16_units' class='method'><code>fn <a href='#method.utf16_units' class='fnname'>utf16_units</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/str/struct.Utf16Units.html' title='collections::str::Utf16Units'>Utf16Units</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: this functionality may only be provided by libunicode</p>
+</em></div><div class='docblock'><p>Returns an iterator of <code>u16</code> over the string encoded as UTF-16.</p>
+</div><h4 id='method.contains' class='method'><code>fn <a href='#method.contains' class='fnname'>contains</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns <code>true</code> if <code>self</code> contains another <code>&amp;str</code>.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='string'>&quot;bananas&quot;</span>.<span class='ident'>contains</span>(<span class='string'>&quot;nana&quot;</span>));
+
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='op'>!</span><span class='string'>&quot;bananas&quot;</span>.<span class='ident'>contains</span>(<span class='string'>&quot;foobar&quot;</span>));
+</pre>
+</div><h4 id='method.starts_with' class='method'><code>fn <a href='#method.starts_with' class='fnname'>starts_with</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns <code>true</code> if the given <code>&amp;str</code> is a prefix of the string.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='string'>&quot;banana&quot;</span>.<span class='ident'>starts_with</span>(<span class='string'>&quot;ba&quot;</span>));
+</pre>
+</div><h4 id='method.ends_with' class='method'><code>fn <a href='#method.ends_with' class='fnname'>ends_with</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns true if the given <code>&amp;str</code> is a suffix of the string.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='string'>&quot;banana&quot;</span>.<span class='ident'>ends_with</span>(<span class='string'>&quot;nana&quot;</span>));
+</pre>
+</div><h4 id='method.find' class='method'><code>fn <a href='#method.find' class='fnname'>find</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='enum' href='http://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns the byte index of the first character of <code>self</code> that matches
+the pattern, if it
+exists.</p>
+
+<p>Returns <code>None</code> if it doesn&#39;t exist.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the
+split.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>find</span>(<span class='string'>&#39;L&#39;</span>), <span class='prelude-val'>Some</span>(<span class='number'>0</span>));
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>find</span>(<span class='string'>&#39;é&#39;</span>), <span class='prelude-val'>Some</span>(<span class='number'>14</span>));
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>find</span>(<span class='string'>&quot;Léopard&quot;</span>), <span class='prelude-val'>Some</span>(<span class='number'>13</span>));
+</pre>
+
+<p>More complex patterns with closures:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>find</span>(<span class='ident'>char</span>::<span class='ident'>is_whitespace</span>), <span class='prelude-val'>Some</span>(<span class='number'>5</span>));
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>find</span>(<span class='ident'>char</span>::<span class='ident'>is_lowercase</span>), <span class='prelude-val'>Some</span>(<span class='number'>1</span>));
+</pre>
+
+<p>Not finding the pattern:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&#39;1&#39;</span>, <span class='string'>&#39;2&#39;</span>];
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>find</span>(<span class='ident'>x</span>), <span class='prelude-val'>None</span>);
+</pre>
+</div><h4 id='method.rfind' class='method'><code>fn <a href='#method.rfind' class='fnname'>rfind</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='enum' href='http://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns the byte index of the last character of <code>self</code> that
+matches the pattern, if it
+exists.</p>
+
+<p>Returns <code>None</code> if it doesn&#39;t exist.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>,
+or a closure that determines the split.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>rfind</span>(<span class='string'>&#39;L&#39;</span>), <span class='prelude-val'>Some</span>(<span class='number'>13</span>));
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>rfind</span>(<span class='string'>&#39;é&#39;</span>), <span class='prelude-val'>Some</span>(<span class='number'>14</span>));
+</pre>
+
+<p>More complex patterns with closures:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>rfind</span>(<span class='ident'>char</span>::<span class='ident'>is_whitespace</span>), <span class='prelude-val'>Some</span>(<span class='number'>12</span>));
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>rfind</span>(<span class='ident'>char</span>::<span class='ident'>is_lowercase</span>), <span class='prelude-val'>Some</span>(<span class='number'>20</span>));
+</pre>
+
+<p>Not finding the pattern:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;Löwe 老虎 Léopard&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&#39;1&#39;</span>, <span class='string'>&#39;2&#39;</span>];
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>rfind</span>(<span class='ident'>x</span>), <span class='prelude-val'>None</span>);
+</pre>
+</div><h4 id='method.split' class='method'><code>fn <a href='#method.split' class='fnname'>split</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.Split.html' title='core::str::Split'>Split</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over substrings of <code>self</code>, separated by characters
+matched by a pattern.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split. Additional libraries might provide more complex
+patterns like regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator will be double ended if the pattern allows a
+reverse search and forward/reverse search yields the same elements.
+This is true for, eg, <code>char</code> but not
+for <code>&amp;str</code>.</p>
+
+<p>If the pattern allows a reverse search but its results might differ
+from a forward search, <code>rsplit()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;Mary had a little lamb&quot;</span>.<span class='ident'>split</span>(<span class='string'>&#39; &#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;Mary&quot;</span>, <span class='string'>&quot;had&quot;</span>, <span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;little&quot;</span>, <span class='string'>&quot;lamb&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;&quot;</span>.<span class='ident'>split</span>(<span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lionXXtigerXleopard&quot;</span>.<span class='ident'>split</span>(<span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;lion&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;tiger&quot;</span>, <span class='string'>&quot;leopard&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lion::tiger::leopard&quot;</span>.<span class='ident'>split</span>(<span class='string'>&quot;::&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;lion&quot;</span>, <span class='string'>&quot;tiger&quot;</span>, <span class='string'>&quot;leopard&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc1def2ghi&quot;</span>.<span class='ident'>split</span>(<span class='ident'>char</span>::<span class='ident'>is_numeric</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;def&quot;</span>, <span class='string'>&quot;ghi&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lionXtigerXleopard&quot;</span>.<span class='ident'>split</span>(<span class='ident'>char</span>::<span class='ident'>is_uppercase</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;lion&quot;</span>, <span class='string'>&quot;tiger&quot;</span>, <span class='string'>&quot;leopard&quot;</span>]);
+</pre>
+
+<p>A more complex pattern, using a closure:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc1defXghi&quot;</span>.<span class='ident'>split</span>(<span class='op'>|</span><span class='ident'>c</span><span class='op'>|</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;1&#39;</span> <span class='op'>||</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;def&quot;</span>, <span class='string'>&quot;ghi&quot;</span>]);
+</pre>
+
+<p>If a string contains multiple contiguous separators, you will end up
+with empty strings in the output:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>x</span> <span class='op'>=</span> <span class='string'>&quot;||||a||b|c&quot;</span>.<span class='ident'>to_string</span>();
+<span class='kw'>let</span> <span class='ident'>d</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>x</span>.<span class='ident'>split</span>(<span class='string'>&#39;|&#39;</span>).<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>d</span>, <span class='kw-2'>&amp;</span>[<span class='string'>&quot;&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;b&quot;</span>, <span class='string'>&quot;c&quot;</span>]);
+</pre>
+
+<p>This can lead to possibly surprising behavior when whitespace is used
+as the separator. This code is correct:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>x</span> <span class='op'>=</span> <span class='string'>&quot; a b c&quot;</span>.<span class='ident'>to_string</span>();
+<span class='kw'>let</span> <span class='ident'>d</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>_<span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>x</span>.<span class='ident'>split</span>(<span class='string'>&#39; &#39;</span>).<span class='ident'>collect</span>();
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>d</span>, <span class='kw-2'>&amp;</span>[<span class='string'>&quot;&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;b&quot;</span>, <span class='string'>&quot;c&quot;</span>]);
+</pre>
+
+<p>It does <em>not</em> give you:</p>
+<pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>d</span>, <span class='kw-2'>&amp;</span>[<span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;b&quot;</span>, <span class='string'>&quot;c&quot;</span>]);
+</pre>
+</div><h4 id='method.rsplit' class='method'><code>fn <a href='#method.rsplit' class='fnname'>rsplit</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.RSplit.html' title='core::str::RSplit'>RSplit</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over substrings of <code>self</code>, separated by characters
+matched by a pattern and yielded in reverse order.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator requires that the pattern supports a
+reverse search,
+and it will be double ended if a forward/reverse search yields
+the same elements.</p>
+
+<p>For iterating from the front, <code>split()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;Mary had a little lamb&quot;</span>.<span class='ident'>rsplit</span>(<span class='string'>&#39; &#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;lamb&quot;</span>, <span class='string'>&quot;little&quot;</span>, <span class='string'>&quot;a&quot;</span>, <span class='string'>&quot;had&quot;</span>, <span class='string'>&quot;Mary&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;&quot;</span>.<span class='ident'>rsplit</span>(<span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lionXXtigerXleopard&quot;</span>.<span class='ident'>rsplit</span>(<span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;leopard&quot;</span>, <span class='string'>&quot;tiger&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;lion&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lion::tiger::leopard&quot;</span>.<span class='ident'>rsplit</span>(<span class='string'>&quot;::&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;leopard&quot;</span>, <span class='string'>&quot;tiger&quot;</span>, <span class='string'>&quot;lion&quot;</span>]);
+</pre>
+
+<p>A more complex pattern, using a closure:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc1defXghi&quot;</span>.<span class='ident'>rsplit</span>(<span class='op'>|</span><span class='ident'>c</span><span class='op'>|</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;1&#39;</span> <span class='op'>||</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;ghi&quot;</span>, <span class='string'>&quot;def&quot;</span>, <span class='string'>&quot;abc&quot;</span>]);
+</pre>
+</div><h4 id='method.split_terminator' class='method'><code>fn <a href='#method.split_terminator' class='fnname'>split_terminator</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.SplitTerminator.html' title='core::str::SplitTerminator'>SplitTerminator</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over substrings of <code>self</code>, separated by characters
+matched by a pattern.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns
+like regular expressions.</p>
+
+<p>Equivalent to <code>split</code>, except that the trailing substring
+is skipped if empty.</p>
+
+<p>This method can be used for string data that is <em>terminated</em>,
+rather than <em>separated</em> by a pattern.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator will be double ended if the pattern allows a
+reverse search
+and forward/reverse search yields the same elements. This is true
+for, eg, <code>char</code> but not for <code>&amp;str</code>.</p>
+
+<p>If the pattern allows a reverse search but its results might differ
+from a forward search, <code>rsplit_terminator()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;A.B.&quot;</span>.<span class='ident'>split_terminator</span>(<span class='string'>&#39;.&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;A&quot;</span>, <span class='string'>&quot;B&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;A..B..&quot;</span>.<span class='ident'>split_terminator</span>(<span class='string'>&quot;.&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;A&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;B&quot;</span>, <span class='string'>&quot;&quot;</span>]);
+</pre>
+</div><h4 id='method.rsplit_terminator' class='method'><code>fn <a href='#method.rsplit_terminator' class='fnname'>rsplit_terminator</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.RSplitTerminator.html' title='core::str::RSplitTerminator'>RSplitTerminator</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over substrings of <code>self</code>, separated by characters
+matched by a pattern and yielded in reverse order.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<p>Equivalent to <code>split</code>, except that the trailing substring is
+skipped if empty.</p>
+
+<p>This method can be used for string data that is <em>terminated</em>,
+rather than <em>separated</em> by a pattern.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator requires that the pattern supports a
+reverse search, and it will be double ended if a forward/reverse
+search yields the same elements.</p>
+
+<p>For iterating from the front, <code>split_terminator()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;A.B.&quot;</span>.<span class='ident'>rsplit_terminator</span>(<span class='string'>&#39;.&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;B&quot;</span>, <span class='string'>&quot;A&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;A..B..&quot;</span>.<span class='ident'>rsplit_terminator</span>(<span class='string'>&quot;.&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;&quot;</span>, <span class='string'>&quot;B&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;A&quot;</span>]);
+</pre>
+</div><h4 id='method.splitn' class='method'><code>fn <a href='#method.splitn' class='fnname'>splitn</a>&lt;'a, P&gt;(&amp;'a self, count: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.SplitN.html' title='core::str::SplitN'>SplitN</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over substrings of <code>self</code>, separated by a pattern,
+restricted to returning
+at most <code>count</code> items.</p>
+
+<p>The last element returned, if any, will contain the remainder of the
+string.
+The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator will not be double ended, because it is
+not efficient to support.</p>
+
+<p>If the pattern allows a reverse search, <code>rsplitn()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;Mary had a little lambda&quot;</span>.<span class='ident'>splitn</span>(<span class='number'>3</span>, <span class='string'>&#39; &#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;Mary&quot;</span>, <span class='string'>&quot;had&quot;</span>, <span class='string'>&quot;a little lambda&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lionXXtigerXleopard&quot;</span>.<span class='ident'>splitn</span>(<span class='number'>3</span>, <span class='string'>&quot;X&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;lion&quot;</span>, <span class='string'>&quot;&quot;</span>, <span class='string'>&quot;tigerXleopard&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abcXdef&quot;</span>.<span class='ident'>splitn</span>(<span class='number'>1</span>, <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;abcXdef&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;&quot;</span>.<span class='ident'>splitn</span>(<span class='number'>1</span>, <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;&quot;</span>]);
+</pre>
+
+<p>A more complex pattern, using a closure:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc1defXghi&quot;</span>.<span class='ident'>splitn</span>(<span class='number'>2</span>, <span class='op'>|</span><span class='ident'>c</span><span class='op'>|</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;1&#39;</span> <span class='op'>||</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;defXghi&quot;</span>]);
+</pre>
+</div><h4 id='method.rsplitn' class='method'><code>fn <a href='#method.rsplitn' class='fnname'>rsplitn</a>&lt;'a, P&gt;(&amp;'a self, count: <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.RSplitN.html' title='core::str::RSplitN'>RSplitN</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over substrings of <code>self</code>, separated by a pattern,
+starting from the end of the string, restricted to returning
+at most <code>count</code> items.</p>
+
+<p>The last element returned, if any, will contain the remainder of the
+string.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator will not be double ended, because it is not
+efficient to support.</p>
+
+<p><code>splitn()</code> can be used for splitting from the front.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;Mary had a little lamb&quot;</span>.<span class='ident'>rsplitn</span>(<span class='number'>3</span>, <span class='string'>&#39; &#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;lamb&quot;</span>, <span class='string'>&quot;little&quot;</span>, <span class='string'>&quot;Mary had a&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lionXXtigerXleopard&quot;</span>.<span class='ident'>rsplitn</span>(<span class='number'>3</span>, <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;leopard&quot;</span>, <span class='string'>&quot;tiger&quot;</span>, <span class='string'>&quot;lionX&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;lion::tiger::leopard&quot;</span>.<span class='ident'>rsplitn</span>(<span class='number'>2</span>, <span class='string'>&quot;::&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;leopard&quot;</span>, <span class='string'>&quot;lion::tiger&quot;</span>]);
+</pre>
+
+<p>A more complex pattern, using a closure:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abc1defXghi&quot;</span>.<span class='ident'>rsplitn</span>(<span class='number'>2</span>, <span class='op'>|</span><span class='ident'>c</span><span class='op'>|</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;1&#39;</span> <span class='op'>||</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;X&#39;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;ghi&quot;</span>, <span class='string'>&quot;abc1def&quot;</span>]);
+</pre>
+</div><h4 id='method.matches' class='method'><code>fn <a href='#method.matches' class='fnname'>matches</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.Matches.html' title='core::str::Matches'>Matches</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over the matches of a pattern within <code>self</code>.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator will be double ended if the pattern allows
+a reverse search
+and forward/reverse search yields the same elements. This is true
+for, eg, <code>char</code> but not
+for <code>&amp;str</code>.</p>
+
+<p>If the pattern allows a reverse search but its results might differ
+from a forward search, <code>rmatches()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abcXXXabcYYYabc&quot;</span>.<span class='ident'>matches</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;abc&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;1abc2abc3&quot;</span>.<span class='ident'>matches</span>(<span class='ident'>char</span>::<span class='ident'>is_numeric</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;1&quot;</span>, <span class='string'>&quot;2&quot;</span>, <span class='string'>&quot;3&quot;</span>]);
+</pre>
+</div><h4 id='method.rmatches' class='method'><code>fn <a href='#method.rmatches' class='fnname'>rmatches</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.RMatches.html' title='core::str::RMatches'>RMatches</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>An iterator over the matches of a pattern within <code>self</code>, yielded in
+reverse order.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator requires that the pattern supports a
+reverse search,
+and it will be double ended if a forward/reverse search yields
+the same elements.</p>
+
+<p>For iterating from the front, <code>matches()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abcXXXabcYYYabc&quot;</span>.<span class='ident'>rmatches</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;abc&quot;</span>, <span class='string'>&quot;abc&quot;</span>]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;1abc2abc3&quot;</span>.<span class='ident'>rmatches</span>(<span class='ident'>char</span>::<span class='ident'>is_numeric</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [<span class='string'>&quot;3&quot;</span>, <span class='string'>&quot;2&quot;</span>, <span class='string'>&quot;1&quot;</span>]);
+</pre>
+</div><h4 id='method.match_indices' class='method'><code>fn <a href='#method.match_indices' class='fnname'>match_indices</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.MatchIndices.html' title='core::str::MatchIndices'>MatchIndices</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: might have its iterator type changed</p>
+</em></div><div class='docblock'><p>An iterator over the start and end indices of the disjoint matches
+of a pattern within <code>self</code>.</p>
+
+<p>For matches of <code>pat</code> within <code>self</code> that overlap, only the indices
+corresponding to the first
+match are returned.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines
+the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator will be double ended if the pattern allows a
+reverse search
+and forward/reverse search yields the same elements. This is true for,
+eg, <code>char</code> but not
+for <code>&amp;str</code>.</p>
+
+<p>If the pattern allows a reverse search but its results might differ
+from a forward search, <code>rmatch_indices()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>usize</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abcXXXabcYYYabc&quot;</span>.<span class='ident'>match_indices</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [(<span class='number'>0</span>, <span class='number'>3</span>), (<span class='number'>6</span>, <span class='number'>9</span>), (<span class='number'>12</span>, <span class='number'>15</span>)]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>usize</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;1abcabc2&quot;</span>.<span class='ident'>match_indices</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [(<span class='number'>1</span>, <span class='number'>4</span>), (<span class='number'>4</span>, <span class='number'>7</span>)]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>usize</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;ababa&quot;</span>.<span class='ident'>match_indices</span>(<span class='string'>&quot;aba&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [(<span class='number'>0</span>, <span class='number'>3</span>)]); <span class='comment'>// only the first `aba`</span>
+</pre>
+</div><h4 id='method.rmatch_indices' class='method'><code>fn <a href='#method.rmatch_indices' class='fnname'>rmatch_indices</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/core/str/struct.RMatchIndices.html' title='core::str::RMatchIndices'>RMatchIndices</a>&lt;'a, P&gt; <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: might have its iterator type changed</p>
+</em></div><div class='docblock'><p>An iterator over the start and end indices of the disjoint matches of
+a pattern within
+<code>self</code>, yielded in reverse order.</p>
+
+<p>For matches of <code>pat</code> within <code>self</code> that overlap, only the indices
+corresponding to the last
+match are returned.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines
+the split.
+Additional libraries might provide more complex patterns like
+regular expressions.</p>
+
+<h1 id="iterator-behavior" class='section-header'><a
+ href="#iterator-behavior">Iterator behavior</a></h1>
+<p>The returned iterator requires that the pattern supports a
+reverse search,
+and it will be double ended if a forward/reverse search yields
+the same elements.</p>
+
+<p>For iterating from the front, <code>match_indices()</code> can be used.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>usize</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;abcXXXabcYYYabc&quot;</span>.<span class='ident'>rmatch_indices</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [(<span class='number'>12</span>, <span class='number'>15</span>), (<span class='number'>6</span>, <span class='number'>9</span>), (<span class='number'>0</span>, <span class='number'>3</span>)]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>usize</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;1abcabc2&quot;</span>.<span class='ident'>rmatch_indices</span>(<span class='string'>&quot;abc&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [(<span class='number'>4</span>, <span class='number'>7</span>), (<span class='number'>1</span>, <span class='number'>4</span>)]);
+
+<span class='kw'>let</span> <span class='ident'>v</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span>(<span class='ident'>usize</span>, <span class='ident'>usize</span>)<span class='op'>&gt;</span> <span class='op'>=</span> <span class='string'>&quot;ababa&quot;</span>.<span class='ident'>rmatch_indices</span>(<span class='string'>&quot;aba&quot;</span>).<span class='ident'>collect</span>();
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>v</span>, [(<span class='number'>2</span>, <span class='number'>5</span>)]); <span class='comment'>// only the last `aba`</span>
+</pre>
+</div><h4 id='method.subslice_offset' class='method'><code>fn <a href='#method.subslice_offset' class='fnname'>subslice_offset</a>(&amp;self, inner: &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: awaiting convention about comparability of arbitrary slices</p>
+</em></div><div class='docblock'><p>Returns the byte offset of an inner slice relative to an enclosing
+outer slice.</p>
+
+<h1 id="panics" class='section-header'><a
+ href="#panics">Panics</a></h1>
+<p>Panics if <code>inner</code> is not a direct slice contained within self.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>string</span> <span class='op'>=</span> <span class='string'>&quot;a\nb\nc&quot;</span>;
+<span class='kw'>let</span> <span class='ident'>lines</span>: <span class='ident'>Vec</span><span class='op'>&lt;</span><span class='kw-2'>&amp;</span><span class='ident'>str</span><span class='op'>&gt;</span> <span class='op'>=</span> <span class='ident'>string</span>.<span class='ident'>lines</span>().<span class='ident'>collect</span>();
+
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>string</span>.<span class='ident'>subslice_offset</span>(<span class='ident'>lines</span>[<span class='number'>0</span>]) <span class='op'>==</span> <span class='number'>0</span>); <span class='comment'>// &amp;&quot;a&quot;</span>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>string</span>.<span class='ident'>subslice_offset</span>(<span class='ident'>lines</span>[<span class='number'>1</span>]) <span class='op'>==</span> <span class='number'>2</span>); <span class='comment'>// &amp;&quot;b&quot;</span>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>string</span>.<span class='ident'>subslice_offset</span>(<span class='ident'>lines</span>[<span class='number'>2</span>]) <span class='op'>==</span> <span class='number'>4</span>); <span class='comment'>// &amp;&quot;c&quot;</span>
+</pre>
+</div><h4 id='method.trim' class='method'><code>fn <a href='#method.trim' class='fnname'>trim</a>(&amp;self) -&gt; &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+<div class='docblock'><p>Returns a <code>&amp;str</code> with leading and trailing whitespace removed.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot; Hello\tworld\t&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>trim</span>(), <span class='string'>&quot;Hello\tworld&quot;</span>);
+</pre>
+</div><h4 id='method.trim_left' class='method'><code>fn <a href='#method.trim_left' class='fnname'>trim_left</a>(&amp;self) -&gt; &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+<div class='docblock'><p>Returns a <code>&amp;str</code> with leading whitespace removed.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot; Hello\tworld\t&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>trim_left</span>(), <span class='string'>&quot;Hello\tworld\t&quot;</span>);
+</pre>
+</div><h4 id='method.trim_right' class='method'><code>fn <a href='#method.trim_right' class='fnname'>trim_right</a>(&amp;self) -&gt; &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+<div class='docblock'><p>Returns a <code>&amp;str</code> with trailing whitespace removed.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot; Hello\tworld\t&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>trim_right</span>(), <span class='string'>&quot; Hello\tworld&quot;</span>);
+</pre>
+</div><h4 id='method.trim_matches' class='method'><code>fn <a href='#method.trim_matches' class='fnname'>trim_matches</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; &amp;'a <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a> <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.DoubleEndedSearcher.html' title='core::str::pattern::DoubleEndedSearcher'>DoubleEndedSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns a string with all pre- and suffixes that match a pattern
+repeatedly removed.</p>
+
+<p>The pattern can be a simple <code>char</code>, or a closure that determines
+the split.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;11foo1bar11&quot;</span>.<span class='ident'>trim_matches</span>(<span class='string'>&#39;1&#39;</span>), <span class='string'>&quot;foo1bar&quot;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;123foo1bar123&quot;</span>.<span class='ident'>trim_matches</span>(<span class='ident'>char</span>::<span class='ident'>is_numeric</span>), <span class='string'>&quot;foo1bar&quot;</span>);
+
+<span class='kw'>let</span> <span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&#39;1&#39;</span>, <span class='string'>&#39;2&#39;</span>];
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;12foo1bar12&quot;</span>.<span class='ident'>trim_matches</span>(<span class='ident'>x</span>), <span class='string'>&quot;foo1bar&quot;</span>);
+</pre>
+
+<p>A more complex pattern, using a closure:</p>
+<pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;1foo1barXX&quot;</span>.<span class='ident'>trim_matches</span>(<span class='op'>|</span><span class='ident'>c</span><span class='op'>|</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;1&#39;</span> <span class='op'>||</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;X&#39;</span>), <span class='string'>&quot;foo1bar&quot;</span>);
+</pre>
+</div><h4 id='method.trim_left_matches' class='method'><code>fn <a href='#method.trim_left_matches' class='fnname'>trim_left_matches</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; &amp;'a <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a> <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns a string with all prefixes that match a pattern
+repeatedly removed.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;11foo1bar11&quot;</span>.<span class='ident'>trim_left_matches</span>(<span class='string'>&#39;1&#39;</span>), <span class='string'>&quot;foo1bar11&quot;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;123foo1bar123&quot;</span>.<span class='ident'>trim_left_matches</span>(<span class='ident'>char</span>::<span class='ident'>is_numeric</span>), <span class='string'>&quot;foo1bar123&quot;</span>);
+
+<span class='kw'>let</span> <span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&#39;1&#39;</span>, <span class='string'>&#39;2&#39;</span>];
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;12foo1bar12&quot;</span>.<span class='ident'>trim_left_matches</span>(<span class='ident'>x</span>), <span class='string'>&quot;foo1bar12&quot;</span>);
+</pre>
+</div><h4 id='method.trim_right_matches' class='method'><code>fn <a href='#method.trim_right_matches' class='fnname'>trim_right_matches</a>&lt;'a, P&gt;(&amp;'a self, pat: P) -&gt; &amp;'a <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a> <span class='where'>where P: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Pattern</a>&lt;'a&gt;, P::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.Pattern.html' title='core::str::pattern::Pattern'>Searcher</a>: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/pattern/trait.ReverseSearcher.html' title='core::str::pattern::ReverseSearcher'>ReverseSearcher</a>&lt;'a&gt;</span></code></h4>
+<div class='docblock'><p>Returns a string with all suffixes that match a pattern
+repeatedly removed.</p>
+
+<p>The pattern can be a simple <code>&amp;str</code>, <code>char</code>, or a closure that
+determines the split.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1>
+<p>Simple patterns:</p>
+<pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;11foo1bar11&quot;</span>.<span class='ident'>trim_right_matches</span>(<span class='string'>&#39;1&#39;</span>), <span class='string'>&quot;11foo1bar&quot;</span>);
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;123foo1bar123&quot;</span>.<span class='ident'>trim_right_matches</span>(<span class='ident'>char</span>::<span class='ident'>is_numeric</span>), <span class='string'>&quot;123foo1bar&quot;</span>);
+
+<span class='kw'>let</span> <span class='ident'>x</span>: <span class='kw-2'>&amp;</span>[_] <span class='op'>=</span> <span class='kw-2'>&amp;</span>[<span class='string'>&#39;1&#39;</span>, <span class='string'>&#39;2&#39;</span>];
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;12foo1bar12&quot;</span>.<span class='ident'>trim_right_matches</span>(<span class='ident'>x</span>), <span class='string'>&quot;12foo1bar&quot;</span>);
+</pre>
+
+<p>A more complex pattern, using a closure:</p>
+<pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;1fooX&quot;</span>.<span class='ident'>trim_left_matches</span>(<span class='op'>|</span><span class='ident'>c</span><span class='op'>|</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;1&#39;</span> <span class='op'>||</span> <span class='ident'>c</span> <span class='op'>==</span> <span class='string'>&#39;X&#39;</span>), <span class='string'>&quot;fooX&quot;</span>);
+</pre>
+</div><h4 id='method.parse' class='method'><code>fn <a href='#method.parse' class='fnname'>parse</a>&lt;F&gt;(&amp;self) -&gt; <a class='enum' href='http://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;F, F::<a class='trait' href='http://doc.rust-lang.org/nightly/core/str/trait.FromStr.html' title='core::str::FromStr'>Err</a>&gt; <span class='where'>where F: <a class='trait' href='http://doc.rust-lang.org/nightly/core/str/trait.FromStr.html' title='core::str::FromStr'>FromStr</a></span></code></h4>
+<div class='docblock'><p>Parses <code>self</code> into the specified type.</p>
+
+<h1 id="failure" class='section-header'><a
+ href="#failure">Failure</a></h1>
+<p>Will return <code>Err</code> if it&#39;s not possible to parse <code>self</code> into the type.</p>
+
+<h1 id="example" class='section-header'><a
+ href="#example">Example</a></h1><pre class='rust rust-example-rendered'>
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&quot;4&quot;</span>.<span class='ident'>parse</span>::<span class='op'>&lt;</span><span class='ident'>u32</span><span class='op'>&gt;</span>(), <span class='prelude-val'>Ok</span>(<span class='number'>4</span>));
+</pre>
+
+<p>Failing:</p>
+<pre class='rust rust-example-rendered'>
+<span class='macro'>assert</span><span class='macro'>!</span>(<span class='string'>&quot;j&quot;</span>.<span class='ident'>parse</span>::<span class='op'>&lt;</span><span class='ident'>u32</span><span class='op'>&gt;</span>().<span class='ident'>is_err</span>());
+</pre>
+</div><h4 id='method.replace' class='method'><code>fn <a href='#method.replace' class='fnname'>replace</a>(&amp;self, from: &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, to: &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code></h4>
+<div class='docblock'><p>Replaces all occurrences of one string with another.</p>
+
+<p><code>replace</code> takes two arguments, a sub-<code>&amp;str</code> to find in <code>self</code>, and a
+second <code>&amp;str</code> to
+replace it with. If the original <code>&amp;str</code> isn&#39;t found, no change occurs.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;this is old&quot;</span>;
+
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>replace</span>(<span class='string'>&quot;old&quot;</span>, <span class='string'>&quot;new&quot;</span>), <span class='string'>&quot;this is new&quot;</span>);
+</pre>
+
+<p>When a <code>&amp;str</code> isn&#39;t found:</p>
+<pre class='rust rust-example-rendered'>
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;this is old&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>replace</span>(<span class='string'>&quot;cookie monster&quot;</span>, <span class='string'>&quot;little lamb&quot;</span>), <span class='ident'>s</span>);
+</pre>
+</div><h4 id='method.to_lowercase' class='method'><code>fn <a href='#method.to_lowercase' class='fnname'>to_lowercase</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code></h4>
+<div class='docblock'><p>Returns the lowercase equivalent of this string.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>feature</span>(<span class='ident'>str_casing</span>)]</span>
+
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;HELLO&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>to_lowercase</span>(), <span class='string'>&quot;hello&quot;</span>);
+</pre>
+</div><h4 id='method.to_uppercase' class='method'><code>fn <a href='#method.to_uppercase' class='fnname'>to_uppercase</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code></h4>
+<div class='docblock'><p>Returns the uppercase equivalent of this string.</p>
+
+<h1 id="examples" class='section-header'><a
+ href="#examples">Examples</a></h1><pre class='rust rust-example-rendered'>
+<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>feature</span>(<span class='ident'>str_casing</span>)]</span>
+
+<span class='kw'>let</span> <span class='ident'>s</span> <span class='op'>=</span> <span class='string'>&quot;hello&quot;</span>;
+<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>s</span>.<span class='ident'>to_uppercase</span>(), <span class='string'>&quot;HELLO&quot;</span>);
+</pre>
+</div><h4 id='method.escape_default' class='method'><code>fn <a href='#method.escape_default' class='fnname'>escape_default</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: return type may change to be an iterator</p>
+</em></div><div class='docblock'><p>Escapes each char in <code>s</code> with <code>char::escape_default</code>.</p>
+</div><h4 id='method.escape_unicode' class='method'><code>fn <a href='#method.escape_unicode' class='fnname'>escape_unicode</a>(&amp;self) -&gt; <a class='struct' href='http://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code></h4>
+<div class='stability'><em class='stab unstable'>Unstable<p>: return type may change to be an iterator</p>
+</em></div><div class='docblock'><p>Escapes each char in <code>s</code> with <code>char::escape_unicode</code>.</p>
+</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl&lt;'s&gt; <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='../../openssl/x509/struct.SslString.html' title='openssl::x509::SslString'>SslString</a></code></h3><div class='impl-items'><h4 id='method.drop' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#method.drop' class='fnname'>drop</a>(&amp;mut self)</code></h4>
+</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Deref.html' title='core::ops::Deref'>Deref</a> for <a class='struct' href='../../openssl/x509/struct.SslString.html' title='openssl::x509::SslString'>SslString</a></code></h3><div class='impl-items'><h4 id='assoc_type.Target' class='type'><code>type Target = <a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+<h4 id='method.deref' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Deref.html#method.deref' class='fnname'>deref</a>(&amp;self) -&gt; &amp;<a href='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
+</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='../../openssl/x509/struct.SslString.html' title='openssl::x509::SslString'>SslString</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#method.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='http://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
+</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../openssl/x509/struct.SslString.html' title='openssl::x509::SslString'>SslString</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class='struct' href='http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='http://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
+</div></section>
+ <section id='search' class="content hidden"></section>
+
+ <section class="footer"></section>
+
+ <div id="help" class="hidden">
+ <div class="shortcuts">
+ <h1>Keyboard shortcuts</h1>
+ <dl>
+ <dt>?</dt>
+ <dd>Show this help dialog</dd>
+ <dt>S</dt>
+ <dd>Focus the search field</dd>
+ <dt>&larrb;</dt>
+ <dd>Move up in search results</dd>
+ <dt>&rarrb;</dt>
+ <dd>Move down in search results</dd>
+ <dt>&#9166;</dt>
+ <dd>Go to active search result</dd>
+ </dl>
+ </div>
+ <div class="infos">
+ <h1>Search tricks</h1>
+ <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>typedef</code> (or
+ <code>tdef</code>).
+ </p>
+ <p>
+ Search functions by type signature (e.g.
+ <code>vec -> usize</code>)
+ </p>
+ </div>
+ </div>
+
+
+
+ <script>
+ window.rootPath = "../../";
+ window.currentCrate = "openssl";
+ window.playgroundUrl = "";
+ </script>
+ <script src="../../jquery.js"></script>
+ <script src="../../main.js"></script>
+
+ <script async src="../../search-index.js"></script>
+</body>
+</html> \ No newline at end of file