# C1.WPF.SpellChecker.CharRange.ExpandOverWhitespace

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_SpellChecker_CharRange_ExpandOverWhitespace_" data-uid="C1.WPF.SpellChecker.CharRange.ExpandOverWhitespace*">ExpandOverWhitespace Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_SpellChecker_CharRange_ExpandOverWhitespace_" data-uid="C1.WPF.SpellChecker.CharRange.ExpandOverWhitespace*"></a>
<h4 id="C1_WPF_SpellChecker_CharRange_ExpandOverWhitespace_System_String_C1_WPF_SpellChecker_CharRange_" data-uid="C1.WPF.SpellChecker.CharRange.ExpandOverWhitespace(System.String,C1.WPF.SpellChecker.CharRange)">ExpandOverWhitespace(string, CharRange)</h4>
<div class="markdown level1 summary"><p>Extends a <a class="xref" href="C1.WPF.SpellChecker.CharRange.html">CharRange</a> over whitespace.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static CharRange ExpandOverWhitespace(string text, CharRange error)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function ExpandOverWhitespace(text As String, [error] As CharRange) As CharRange</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>String that contains the <a class="xref" href="C1.WPF.SpellChecker.CharRange.html">CharRange</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.SpellChecker.CharRange.html">CharRange</a></td>
      <td><span class="parametername">error</span></td>
      <td><p><a class="xref" href="C1.WPF.SpellChecker.CharRange.html">CharRange</a> that will be expanded.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.WPF.SpellChecker.CharRange.html">CharRange</a></td>
      <td><p>Expanded <a class="xref" href="C1.WPF.SpellChecker.CharRange.html">CharRange</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_SpellChecker_CharRange_ExpandOverWhitespace_System_String_C1_WPF_SpellChecker_CharRange__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;The method returns a new &lt;xref href=&quot;C1.WPF.SpellChecker.CharRange&quot; data-throw-if-not-resolved=&quot;false&quot;&gt;&lt;/xref&gt; object that includes the original &lt;code class=&quot;paramref&quot;&gt;error&lt;/code&gt;
</code></pre>
<p>plus any whitespace that immediately follows it. If there is no whitespace after the original <code class="paramref">error</code>,
then the returned value is extended to include any whitespace that precedes the original <code class="paramref">error</code>.</p>
<p>This method is used to extend editor selections before deleting duplicate words.</p>
</div>
</div>
