| <!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="Methods for segmenting strings according to Unicode Standard Annex #29."><meta name="keywords" content="rust, rustlang, rust-lang, UnicodeSegmentation"><title>UnicodeSegmentation in unicode_segmentation - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" href="https://unicode-rs.github.io/unicode-rs_sm.png"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../unicode_segmentation/index.html"><div class="logo-container"><img src="https://unicode-rs.github.io/unicode-rs_sm.png" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../unicode_segmentation/index.html"><div class="logo-container"> |
| <img src="https://unicode-rs.github.io/unicode-rs_sm.png" alt="logo"></div></a><h2 class="location"><a href="#">UnicodeSegmentation</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.grapheme_indices">grapheme_indices</a></li><li><a href="#tymethod.graphemes">graphemes</a></li><li><a href="#tymethod.split_sentence_bound_indices">split_sentence_bound_indices</a></li><li><a href="#tymethod.split_sentence_bounds">split_sentence_bounds</a></li><li><a href="#tymethod.split_word_bound_indices">split_word_bound_indices</a></li><li><a href="#tymethod.split_word_bounds">split_word_bounds</a></li><li><a href="#tymethod.unicode_sentences">unicode_sentences</a></li><li><a href="#tymethod.unicode_word_indices">unicode_word_indices</a></li><li><a href="#tymethod.unicode_words">unicode_words</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-UnicodeSegmentation-for-str">str</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In unicode_segmentation</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="index.html">unicode_segmentation</a>::<wbr><a class="trait" href="#">UnicodeSegmentation</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/unicode_segmentation/lib.rs.html#86-260">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait UnicodeSegmentation { |
| fn <a href="#tymethod.graphemes" class="fnname">graphemes</a><'a>(&'a self, is_extended: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.grapheme_indices" class="fnname">grapheme_indices</a><'a>(&'a self, is_extended: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.unicode_words" class="fnname">unicode_words</a><'a>(&'a self) -> <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.unicode_word_indices" class="fnname">unicode_word_indices</a><'a>(&'a self) -> <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.split_word_bounds" class="fnname">split_word_bounds</a><'a>(&'a self) -> <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.split_word_bound_indices" class="fnname">split_word_bound_indices</a><'a>(&'a self) -> <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.unicode_sentences" class="fnname">unicode_sentences</a><'a>(&'a self) -> <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.split_sentence_bounds" class="fnname">split_sentence_bounds</a><'a>(&'a self) -> <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span>; |
| <span class="item-spacer"></span> fn <a href="#tymethod.split_sentence_bound_indices" class="fnname">split_sentence_bound_indices</a><'a>(&'a self) -> <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span>; |
| }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Methods for segmenting strings according to |
| <a href="http://www.unicode.org/reports/tr29/">Unicode Standard Annex #29</a>.</p> |
| </div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.graphemes" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#112">source</a><h4 class="code-header">fn <a href="#tymethod.graphemes" class="fnname">graphemes</a><'a>(&'a self, is_extended: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section></summary><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> |
| <h5 id="examples"><a href="#examples">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>gr1 = UnicodeSegmentation::graphemes(<span class="string">"a\u{310}e\u{301}o\u{308}\u{332}"</span>, <span class="bool-val">true</span>) |
| .collect::<Vec<<span class="kw-2">&</span>str>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">"a\u{310}"</span>, <span class="string">"e\u{301}"</span>, <span class="string">"o\u{308}\u{332}"</span>]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>gr1[..], b); |
| |
| <span class="kw">let </span>gr2 = UnicodeSegmentation::graphemes(<span class="string">"a\r\nb🇷🇺🇸🇹"</span>, <span class="bool-val">true</span>).collect::<Vec<<span class="kw-2">&</span>str>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">"a"</span>, <span class="string">"\r\n"</span>, <span class="string">"b"</span>, <span class="string">"🇷🇺"</span>, <span class="string">"🇸🇹"</span>]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>gr2[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.grapheme_indices" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#127">source</a><h4 class="code-header">fn <a href="#tymethod.grapheme_indices" class="fnname">grapheme_indices</a><'a>(&'a self, is_extended: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section></summary><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> |
| <h5 id="examples-1"><a href="#examples-1">Examples</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>gr_inds = UnicodeSegmentation::grapheme_indices(<span class="string">"a̐éö̲\r\n"</span>, <span class="bool-val">true</span>) |
| .collect::<Vec<(usize, <span class="kw-2">&</span>str)>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[(<span class="number">0</span>, <span class="string">"a̐"</span>), (<span class="number">3</span>, <span class="string">"é"</span>), (<span class="number">6</span>, <span class="string">"ö̲"</span>), (<span class="number">11</span>, <span class="string">"\r\n"</span>)]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>gr_inds[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.unicode_words" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#149">source</a><h4 class="code-header">fn <a href="#tymethod.unicode_words" class="fnname">unicode_words</a><'a>(&'a self) -> <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over the words of <code>self</code>, separated on |
| <a href="http://www.unicode.org/reports/tr29/#Word_Boundaries">UAX#29 word boundaries</a>.</p> |
| <p>Here, “words” are just those substrings which, after splitting on |
| UAX#29 word boundaries, contain any alphanumeric characters. That is, the |
| substring must contain at least one character with the |
| <a href="http://unicode.org/reports/tr44/#Alphabetic">Alphabetic</a> |
| property, or with |
| <a href="http://unicode.org/reports/tr44/#General_Category_Values">General_Category=Number</a>.</p> |
| <h5 id="example"><a href="#example">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uws = <span class="string">"The quick (\"brown\") fox can't jump 32.3 feet, right?"</span>; |
| <span class="kw">let </span>uw1 = uws.unicode_words().collect::<Vec<<span class="kw-2">&</span>str>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">"The"</span>, <span class="string">"quick"</span>, <span class="string">"brown"</span>, <span class="string">"fox"</span>, <span class="string">"can't"</span>, <span class="string">"jump"</span>, <span class="string">"32.3"</span>, <span class="string">"feet"</span>, <span class="string">"right"</span>]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>uw1[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.unicode_word_indices" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#173">source</a><h4 class="code-header">fn <a href="#tymethod.unicode_word_indices" class="fnname">unicode_word_indices</a><'a>(&'a self) -> <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over the words of <code>self</code>, separated on |
| <a href="http://www.unicode.org/reports/tr29/#Word_Boundaries">UAX#29 word boundaries</a>, and their |
| offsets.</p> |
| <p>Here, “words” are just those substrings which, after splitting on |
| UAX#29 word boundaries, contain any alphanumeric characters. That is, the |
| substring must contain at least one character with the |
| <a href="http://unicode.org/reports/tr44/#Alphabetic">Alphabetic</a> |
| property, or with |
| <a href="http://unicode.org/reports/tr44/#General_Category_Values">General_Category=Number</a>.</p> |
| <h5 id="example-1"><a href="#example-1">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uwis = <span class="string">"The quick (\"brown\") fox can't jump 32.3 feet, right?"</span>; |
| <span class="kw">let </span>uwi1 = uwis.unicode_word_indices().collect::<Vec<(usize, <span class="kw-2">&</span>str)>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[(<span class="number">0</span>, <span class="string">"The"</span>), (<span class="number">4</span>, <span class="string">"quick"</span>), (<span class="number">12</span>, <span class="string">"brown"</span>), (<span class="number">20</span>, <span class="string">"fox"</span>), (<span class="number">24</span>, <span class="string">"can't"</span>), |
| (<span class="number">30</span>, <span class="string">"jump"</span>), (<span class="number">35</span>, <span class="string">"32.3"</span>), (<span class="number">40</span>, <span class="string">"feet"</span>), (<span class="number">46</span>, <span class="string">"right"</span>)]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>uwi1[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.split_word_bounds" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#189">source</a><h4 class="code-header">fn <a href="#tymethod.split_word_bounds" class="fnname">split_word_bounds</a><'a>(&'a self) -> <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of <code>self</code> separated on |
| <a href="http://www.unicode.org/reports/tr29/#Word_Boundaries">UAX#29 word boundaries</a>.</p> |
| <p>The concatenation of the substrings returned by this function is just the original string.</p> |
| <h5 id="example-2"><a href="#example-2">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>swu1 = <span class="string">"The quick (\"brown\") fox"</span>.split_word_bounds().collect::<Vec<<span class="kw-2">&</span>str>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">"The"</span>, <span class="string">" "</span>, <span class="string">"quick"</span>, <span class="string">" "</span>, <span class="string">"("</span>, <span class="string">"\""</span>, <span class="string">"brown"</span>, <span class="string">"\""</span>, <span class="string">")"</span>, <span class="string">" "</span>, <span class="string">"fox"</span>]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>swu1[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.split_word_bound_indices" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#204">source</a><h4 class="code-header">fn <a href="#tymethod.split_word_bound_indices" class="fnname">split_word_bound_indices</a><'a>(&'a self) -> <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of <code>self</code>, split on UAX#29 word boundaries, |
| and their offsets. See <code>split_word_bounds()</code> for more information.</p> |
| <h5 id="example-3"><a href="#example-3">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>swi1 = <span class="string">"Brr, it's 29.3°F!"</span>.split_word_bound_indices().collect::<Vec<(usize, <span class="kw-2">&</span>str)>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[(<span class="number">0</span>, <span class="string">"Brr"</span>), (<span class="number">3</span>, <span class="string">","</span>), (<span class="number">4</span>, <span class="string">" "</span>), (<span class="number">5</span>, <span class="string">"it's"</span>), (<span class="number">9</span>, <span class="string">" "</span>), (<span class="number">10</span>, <span class="string">"29.3"</span>), |
| (<span class="number">14</span>, <span class="string">"°"</span>), (<span class="number">16</span>, <span class="string">"F"</span>), (<span class="number">17</span>, <span class="string">"!"</span>)]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>swi1[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.unicode_sentences" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#226">source</a><h4 class="code-header">fn <a href="#tymethod.unicode_sentences" class="fnname">unicode_sentences</a><'a>(&'a self) -> <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of <code>self</code> separated on |
| <a href="http://www.unicode.org/reports/tr29/#Sentence_Boundaries">UAX#29 sentence boundaries</a>.</p> |
| <p>Here, “sentences” are just those substrings which, after splitting on |
| UAX#29 sentence boundaries, contain any alphanumeric characters. That is, the |
| substring must contain at least one character with the |
| <a href="http://unicode.org/reports/tr44/#Alphabetic">Alphabetic</a> |
| property, or with |
| <a href="http://unicode.org/reports/tr44/#General_Category_Values">General_Category=Number</a>.</p> |
| <h5 id="example-4"><a href="#example-4">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uss = <span class="string">"Mr. Fox jumped. [...] The dog was too lazy."</span>; |
| <span class="kw">let </span>us1 = uss.unicode_sentences().collect::<Vec<<span class="kw-2">&</span>str>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">"Mr. "</span>, <span class="string">"Fox jumped. "</span>, <span class="string">"The dog was too lazy."</span>]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>us1[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.split_sentence_bounds" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#243">source</a><h4 class="code-header">fn <a href="#tymethod.split_sentence_bounds" class="fnname">split_sentence_bounds</a><'a>(&'a self) -> <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of <code>self</code> separated on |
| <a href="http://www.unicode.org/reports/tr29/#Sentence_Boundaries">UAX#29 sentence boundaries</a>.</p> |
| <p>The concatenation of the substrings returned by this function is just the original string.</p> |
| <h5 id="example-5"><a href="#example-5">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>ssbs = <span class="string">"Mr. Fox jumped. [...] The dog was too lazy."</span>; |
| <span class="kw">let </span>ssb1 = ssbs.split_sentence_bounds().collect::<Vec<<span class="kw-2">&</span>str>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">"Mr. "</span>, <span class="string">"Fox jumped. "</span>, <span class="string">"[...] "</span>, <span class="string">"The dog was too lazy."</span>]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>ssb1[..], b);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.split_sentence_bound_indices" class="method has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#259">source</a><h4 class="code-header">fn <a href="#tymethod.split_sentence_bound_indices" class="fnname">split_sentence_bound_indices</a><'a>(&'a self) -> <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of <code>self</code>, split on UAX#29 sentence boundaries, |
| and their offsets. See <code>split_sentence_bounds()</code> for more information.</p> |
| <h5 id="example-6"><a href="#example-6">Example</a></h5> |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>ssis = <span class="string">"Mr. Fox jumped. [...] The dog was too lazy."</span>; |
| <span class="kw">let </span>ssi1 = ssis.split_sentence_bound_indices().collect::<Vec<(usize, <span class="kw-2">&</span>str)>>(); |
| <span class="kw">let </span>b: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[(<span class="number">0</span>, <span class="string">"Mr. "</span>), (<span class="number">4</span>, <span class="string">"Fox jumped. "</span>), (<span class="number">16</span>, <span class="string">"[...] "</span>), |
| (<span class="number">22</span>, <span class="string">"The dog was too lazy."</span>)]; |
| |
| <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>ssi1[..], b);</code></pre></div> |
| </div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UnicodeSegmentation-for-str" class="impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#262-307">source</a><a href="#impl-UnicodeSegmentation-for-str" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UnicodeSegmentation.html" title="trait unicode_segmentation::UnicodeSegmentation">UnicodeSegmentation</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><section id="method.graphemes" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#264-266">source</a><a href="#method.graphemes" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.graphemes" class="fnname">graphemes</a>(&self, is_extended: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.Graphemes.html" title="struct unicode_segmentation::Graphemes">Graphemes</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section><section id="method.grapheme_indices" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#269-271">source</a><a href="#method.grapheme_indices" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.grapheme_indices" class="fnname">grapheme_indices</a>(&self, is_extended: <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.bool.html">bool</a>) -> <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.GraphemeIndices.html" title="struct unicode_segmentation::GraphemeIndices">GraphemeIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section><section id="method.unicode_words" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#274-276">source</a><a href="#method.unicode_words" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.unicode_words" class="fnname">unicode_words</a>(&self) -> <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeWords.html" title="struct unicode_segmentation::UnicodeWords">UnicodeWords</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section><section id="method.unicode_word_indices" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#279-281">source</a><a href="#method.unicode_word_indices" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.unicode_word_indices" class="fnname">unicode_word_indices</a>(&self) -> <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeWordIndices.html" title="struct unicode_segmentation::UnicodeWordIndices">UnicodeWordIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section><section id="method.split_word_bounds" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#284-286">source</a><a href="#method.split_word_bounds" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.split_word_bounds" class="fnname">split_word_bounds</a>(&self) -> <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UWordBounds.html" title="struct unicode_segmentation::UWordBounds">UWordBounds</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section><section id="method.split_word_bound_indices" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#289-291">source</a><a href="#method.split_word_bound_indices" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.split_word_bound_indices" class="fnname">split_word_bound_indices</a>(&self) -> <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UWordBoundIndices.html" title="struct unicode_segmentation::UWordBoundIndices">UWordBoundIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section><section id="method.unicode_sentences" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#294-296">source</a><a href="#method.unicode_sentences" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.unicode_sentences" class="fnname">unicode_sentences</a>(&self) -> <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.UnicodeSentences.html" title="struct unicode_segmentation::UnicodeSentences">UnicodeSentences</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section><section id="method.split_sentence_bounds" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#299-301">source</a><a href="#method.split_sentence_bounds" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.split_sentence_bounds" class="fnname">split_sentence_bounds</a>(&self) -> <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.USentenceBounds.html" title="struct unicode_segmentation::USentenceBounds">USentenceBounds</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>;</span></code></span></span></span></span></h4></section><section id="method.split_sentence_bound_indices" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/unicode_segmentation/lib.rs.html#304-306">source</a><a href="#method.split_sentence_bound_indices" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.split_sentence_bound_indices" class="fnname">split_sentence_bound_indices</a>(&self) -> <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'_><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a></span><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.USentenceBoundIndices.html" title="struct unicode_segmentation::USentenceBoundIndices">USentenceBoundIndices</a><'a></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.usize.html">usize</a>, &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.str.html">str</a>);</span></code></span></span></span></span></h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"></div><script src="../implementors/unicode_segmentation/trait.UnicodeSegmentation.js" data-ignore-extern-crates="core" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="unicode_segmentation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |