# C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution*">AnalyzeNumberSubstitution Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_C1_Util_DX_DirectWrite_TextAnalysisSource_System_Int32_System_Int32_C1_Util_DX_DirectWrite_TextAnalysisSink_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution(C1.Util.DX.DirectWrite.TextAnalysisSource,System.Int32,System.Int32,C1.Util.DX.DirectWrite.TextAnalysisSink)">AnalyzeNumberSubstitution(TextAnalysisSource, int, int, TextAnalysisSink)</h4>
<div class="markdown level1 summary"><p>Analyzes a text range for spans where number substitution is applicable, reading attributes from the source and reporting substitutable ranges to the sink callback {{SetNumberSubstitution}}.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AnalyzeNumberSubstitution(TextAnalysisSource analysisSource, int textPosition, int textLength, TextAnalysisSink analysisSink)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AnalyzeNumberSubstitution(analysisSource As TextAnalysisSource, textPosition As Integer, textLength As Integer, analysisSink As TextAnalysisSink)</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="C1.Util.DX.DirectWrite.TextAnalysisSource.html">TextAnalysisSource</a></td>
      <td><span class="parametername">analysisSource</span></td>
      <td><p>The source object to analyze.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textPosition</span></td>
      <td><p>The starting position within the source object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textLength</span></td>
      <td><p>The length to analyze.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextAnalysisSink.html">TextAnalysisSink</a></td>
      <td><span class="parametername">analysisSink</span></td>
      <td><p>A reference to the sink callback object that receives the text analysis.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_C1_Util_DX_DirectWrite_TextAnalysisSource_System_Int32_System_Int32_C1_Util_DX_DirectWrite_TextAnalysisSink__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Although the function can handle multiple ranges of differing number substitutions, the text ranges should not arbitrarily split the middle of numbers. Otherwise, it will treat the numbers separately and will not translate any intervening punctuation.</p>
</div>


<a id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_C1_Util_DX_DirectWrite_TextAnalysisQuickSource_System_Int32_System_Int32_C1_Util_DX_DirectWrite_TextAnalysisSink_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution(C1.Util.DX.DirectWrite.TextAnalysisQuickSource,System.Int32,System.Int32,C1.Util.DX.DirectWrite.TextAnalysisSink)">AnalyzeNumberSubstitution(TextAnalysisQuickSource, int, int, TextAnalysisSink)</h4>
<div class="markdown level1 summary"><p>Analyzes a text range for spans where number substitution is applicable, reading attributes from the source and reporting substitutable ranges to the sink callback {{SetNumberSubstitution}}.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AnalyzeNumberSubstitution(TextAnalysisQuickSource analysisSource, int textPosition, int textLength, TextAnalysisSink analysisSink)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AnalyzeNumberSubstitution(analysisSource As TextAnalysisQuickSource, textPosition As Integer, textLength As Integer, analysisSink As TextAnalysisSink)</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="C1.Util.DX.DirectWrite.TextAnalysisQuickSource.html">TextAnalysisQuickSource</a></td>
      <td><span class="parametername">analysisSource</span></td>
      <td><p>The source object to analyze.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textPosition</span></td>
      <td><p>The starting position within the source object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textLength</span></td>
      <td><p>The length to analyze.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextAnalysisSink.html">TextAnalysisSink</a></td>
      <td><span class="parametername">analysisSink</span></td>
      <td><p>A reference to the sink callback object that receives the text analysis.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_C1_Util_DX_DirectWrite_TextAnalysisQuickSource_System_Int32_System_Int32_C1_Util_DX_DirectWrite_TextAnalysisSink__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Although the function can handle multiple ranges of differing number substitutions, the text ranges should not arbitrarily split the middle of numbers. Otherwise, it will treat the numbers separately and will not translate any intervening punctuation.</p>
</div>


<a id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextAnalyzer_AnalyzeNumberSubstitution_System_IntPtr_System_Int32_System_Int32_System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.TextAnalyzer.AnalyzeNumberSubstitution(System.IntPtr,System.Int32,System.Int32,System.IntPtr)">AnalyzeNumberSubstitution(IntPtr, int, int, IntPtr)</h4>
<div class="markdown level1 summary"><p>HRESULT IDWriteTextAnalyzer::AnalyzeNumberSubstitution([In] IDWriteTextAnalysisSource* analysisSource,[In] unsigned int textPosition,[In] unsigned int textLength,[In] IDWriteTextAnalysisSink* analysisSink)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AnalyzeNumberSubstitution(IntPtr analysisSource, int textPosition, int textLength, IntPtr analysisSink)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AnalyzeNumberSubstitution(analysisSource As IntPtr, textPosition As Integer, textLength As Integer, analysisSink As IntPtr)</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.intptr">IntPtr</a></td>
      <td><span class="parametername">analysisSource</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textPosition</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textLength</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">analysisSink</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
