blob: 86f215425dcfa9152a3c7b284460265625b2672d [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class StringBuilderExtensions
| Apache Lucene.NET 4.8.0 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class StringBuilderExtensions
| Apache Lucene.NET 4.8.0 Documentation ">
<meta name="generator" content="docfx 2.47.0.0">
<link rel="shortcut icon" href="../../logo/favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<meta property="docfx:navrel" content="../../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
<meta property="docfx:rel" content="../../">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Support.StringBuilderExtensions">
<h1 id="Lucene_Net_Support_StringBuilderExtensions" data-uid="Lucene.Net.Support.StringBuilderExtensions" class="text-break">Class StringBuilderExtensions
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">StringBuilderExtensions</span></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<span class="xref">System.Object.Equals(System.Object)</span>
</div>
<div>
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.GetHashCode()</span>
</div>
<div>
<span class="xref">System.Object.GetType()</span>
</div>
<div>
<span class="xref">System.Object.MemberwiseClone()</span>
</div>
<div>
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.ToString()</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="../Lucene.Net.Benchmarks/Lucene.Net.Support.html">Lucene.Net.Support</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Support_StringBuilderExtensions_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class StringBuilderExtensions</code></pre>
</div>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_AppendCodePoint_System_Text_StringBuilder_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.AppendCodePoint(System.Text.StringBuilder%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L167">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_AppendCodePoint_" data-uid="Lucene.Net.Support.StringBuilderExtensions.AppendCodePoint*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_AppendCodePoint_System_Text_StringBuilder_System_Int32_" data-uid="Lucene.Net.Support.StringBuilderExtensions.AppendCodePoint(System.Text.StringBuilder,System.Int32)">AppendCodePoint(StringBuilder, Int32)</h4>
<div class="markdown level1 summary"><p>Appends the string representation of the <code data-dev-comment-type="paramref" class="paramref">codePoint</code>
argument to this sequence.</p>
<p>
The argument is appended to the contents of this sequence.
The length of this sequence increases by <a class="xref" href="Lucene.Net.Support.Character.html#Lucene_Net_Support_Character_CharCount_System_Int32_">CharCount(Int32)</a>.
</p>
<p>
The overall effect is exactly as if the argument were
converted to a <span class="xref">System.Char</span> array by the method
<a class="xref" href="Lucene.Net.Support.Character.html#Lucene_Net_Support_Character_ToChars_System_Int32_">ToChars(Int32)</a> and the character in that array
were then <span class="xref">System.Text.StringBuilder.Append(System.Char[])</span> to this
<span class="xref">System.Text.StringBuilder</span>.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static StringBuilder AppendCodePoint(this StringBuilder text, int codePoint)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>This <span class="xref">System.Text.StringBuilder</span>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">codePoint</span></td>
<td><p>a Unicode code point</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><p>a reference to this object.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_CodePointAt_System_Text_StringBuilder_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.CodePointAt(System.Text.StringBuilder%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L126">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_CodePointAt_" data-uid="Lucene.Net.Support.StringBuilderExtensions.CodePointAt*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_CodePointAt_System_Text_StringBuilder_System_Int32_" data-uid="Lucene.Net.Support.StringBuilderExtensions.CodePointAt(System.Text.StringBuilder,System.Int32)">CodePointAt(StringBuilder, Int32)</h4>
<div class="markdown level1 summary"><p>Returns the character (Unicode code point) at the specified index.
The index refers to char values (Unicode code units) and ranges from 0 to Length - 1.
<p>
If the char value specified at the given index is in the high-surrogate range,
the following index is less than the length of this sequence, and the char value
at the following index is in the low-surrogate range, then the
supplementary code point corresponding to this surrogate pair is returned.
Otherwise, the char value at the given index is returned.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static int CodePointAt(this StringBuilder text, int index)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>this <span class="xref">System.Text.StringBuilder</span></p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">index</span></td>
<td><p>the index to the char values</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>the code point value of the character at the index</p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IndexOutOfRangeException</span></td>
<td><p>if the index argument is negative or not less than the length of this sequence.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_CodePointCount_System_Text_StringBuilder_System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.CodePointCount(System.Text.StringBuilder%2CSystem.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L103">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_CodePointCount_" data-uid="Lucene.Net.Support.StringBuilderExtensions.CodePointCount*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_CodePointCount_System_Text_StringBuilder_System_Int32_System_Int32_" data-uid="Lucene.Net.Support.StringBuilderExtensions.CodePointCount(System.Text.StringBuilder,System.Int32,System.Int32)">CodePointCount(StringBuilder, Int32, Int32)</h4>
<div class="markdown level1 summary"><p>Returns the number of Unicode code points in the specified text
range of this <span class="xref">System.Text.StringBuilder</span>. The text range begins at the specified
<code data-dev-comment-type="paramref" class="paramref">beginIndex</code> and extends to the <span class="xref">System.Char</span> at
index <code>endIndex - 1</code>. Thus the length (in
<span class="xref">System.Char</span>s) of the text range is
<code>endIndex-beginIndex</code>. Unpaired surrogates within
this sequence count as one code point each.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static int CodePointCount(this StringBuilder text, int beginIndex, int endIndex)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>this <span class="xref">System.Text.StringBuilder</span></p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">beginIndex</span></td>
<td><p>the index to the first <span class="xref">System.Char</span> of the text range.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">endIndex</span></td>
<td><p>the index after the last <span class="xref">System.Char</span> of the text range.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>the number of Unicode code points in the specified text range.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.IndexOutOfRangeException</span></td>
<td><p>if the <code data-dev-comment-type="paramref" class="paramref">beginIndex</code> is negative, or <code data-dev-comment-type="paramref" class="paramref">endIndex</code>
is larger than the length of this sequence, or
<code data-dev-comment-type="paramref" class="paramref">beginIndex</code> is larger than <code data-dev-comment-type="paramref" class="paramref">endIndex</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_GetChars_System_Text_StringBuilder_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.GetChars(System.Text.StringBuilder)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L141">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_GetChars_" data-uid="Lucene.Net.Support.StringBuilderExtensions.GetChars*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_GetChars_System_Text_StringBuilder_" data-uid="Lucene.Net.Support.StringBuilderExtensions.GetChars(System.Text.StringBuilder)">GetChars(StringBuilder)</h4>
<div class="markdown level1 summary"><p>Copies the array from the <span class="xref">System.Text.StringBuilder</span> into a new array
and returns it.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static char[] GetChars(this StringBuilder text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>this <span class="xref">System.Text.StringBuilder</span></p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Char</span>[]</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_IndexOf_System_Text_StringBuilder_System_String_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.IndexOf(System.Text.StringBuilder%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L180">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_IndexOf_" data-uid="Lucene.Net.Support.StringBuilderExtensions.IndexOf*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_IndexOf_System_Text_StringBuilder_System_String_" data-uid="Lucene.Net.Support.StringBuilderExtensions.IndexOf(System.Text.StringBuilder,System.String)">IndexOf(StringBuilder, String)</h4>
<div class="markdown level1 summary"><p>Searches for the first index of the specified character. The search for
the character starts at the beginning and moves towards the end.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static int IndexOf(this StringBuilder text, string value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>This <span class="xref">System.Text.StringBuilder</span>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">value</span></td>
<td><p>The string to find.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>The index of the specified character, or -1 if the character isn&apos;t found.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_IndexOf_System_Text_StringBuilder_System_String_System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.IndexOf(System.Text.StringBuilder%2CSystem.String%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L193">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_IndexOf_" data-uid="Lucene.Net.Support.StringBuilderExtensions.IndexOf*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_IndexOf_System_Text_StringBuilder_System_String_System_Int32_" data-uid="Lucene.Net.Support.StringBuilderExtensions.IndexOf(System.Text.StringBuilder,System.String,System.Int32)">IndexOf(StringBuilder, String, Int32)</h4>
<div class="markdown level1 summary"><p>Searches for the index of the specified character. The search for the
character starts at the specified offset and moves towards the end.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static int IndexOf(this StringBuilder text, string value, int startIndex)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>This <span class="xref">System.Text.StringBuilder</span>.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">value</span></td>
<td><p>The string to find.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">startIndex</span></td>
<td><p>The starting offset.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>The index of the specified character, or -1 if the character isn&apos;t found.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_Reverse_System_Text_StringBuilder_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.Reverse(System.Text.StringBuilder)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L47">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_Reverse_" data-uid="Lucene.Net.Support.StringBuilderExtensions.Reverse*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_Reverse_System_Text_StringBuilder_" data-uid="Lucene.Net.Support.StringBuilderExtensions.Reverse(System.Text.StringBuilder)">Reverse(StringBuilder)</h4>
<div class="markdown level1 summary"><p>Causes this character sequence to be replaced by the reverse of
the sequence. If there are any surrogate pairs included in the
sequence, these are treated as single characters for the
reverse operation. Thus, the order of the high-low surrogates
is never reversed.
<p>
Let <code>n</code> be the character length of this character sequence
(not the length in <span class="xref">System.Char</span> values) just prior to
execution of the <a class="xref" href="Lucene.Net.Support.StringBuilderExtensions.html#Lucene_Net_Support_StringBuilderExtensions_Reverse_System_Text_StringBuilder_">Reverse(StringBuilder)</a> method. Then the
character at index <code>k</code> in the new character sequence is
equal to the character at index <code>n-k-1</code> in the old
character sequence.
<p>
Note that the reverse operation may result in producing
surrogate pairs that were unpaired low-surrogates and
high-surrogates before the operation. For example, reversing
&quot;\uDC00\uD800&quot; produces &quot;\uD800\uDC00&quot; which is
a valid surrogate pair.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static StringBuilder Reverse(this StringBuilder text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td><p>this <span class="xref">System.Text.StringBuilder</span></p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><p>a reference to this <span class="xref">System.Text.StringBuilder</span>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions_ToCharSequence_System_Text_StringBuilder_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions.ToCharSequence(System.Text.StringBuilder)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L224">View Source</a>
</span>
<a id="Lucene_Net_Support_StringBuilderExtensions_ToCharSequence_" data-uid="Lucene.Net.Support.StringBuilderExtensions.ToCharSequence*"></a>
<h4 id="Lucene_Net_Support_StringBuilderExtensions_ToCharSequence_System_Text_StringBuilder_" data-uid="Lucene.Net.Support.StringBuilderExtensions.ToCharSequence(System.Text.StringBuilder)">ToCharSequence(StringBuilder)</h4>
<div class="markdown level1 summary"><p>Convenience method to wrap a string in a <a class="xref" href="Lucene.Net.Support.StringBuilderCharSequenceWrapper.html">StringBuilderCharSequenceWrapper</a>
so a <span class="xref">System.Text.StringBuilder</span> can be used as <a class="xref" href="Lucene.Net.Support.ICharSequence.html">ICharSequence</a> in .NET.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static ICharSequence ToCharSequence(this StringBuilder text)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Text.StringBuilder</span></td>
<td><span class="parametername">text</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Support.ICharSequence.html">ICharSequence</a></td>
<td></td>
</tr>
</tbody>
</table>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_StringBuilderExtensions.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.StringBuilderExtensions%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/StringBuilderExtensions.cs/#L23" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>