| <!DOCTYPE html> |
| <!--[if IE]><![endif]--> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <title>Class UnicodeUtil |
| | Apache Lucene.NET 4.8.0-beta00011 Documentation </title> |
| <meta name="viewport" content="width=device-width"> |
| <meta name="title" content="Class UnicodeUtil |
| | Apache Lucene.NET 4.8.0-beta00011 Documentation "> |
| <meta name="generator" content="docfx 2.56.0.0"> |
| |
| <link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css"> |
| <meta property="docfx:navrel" content="toc.html"> |
| <meta property="docfx:tocrel" content="core/toc.html"> |
| |
| <meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/"> |
| |
| </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="/"> |
| <img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/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"> |
| <ul class="level0 breadcrumb"> |
| <li> |
| <a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a> |
| <span id="breadcrumb"> |
| <ul class="breadcrumb"> |
| <li></li> |
| </ul> |
| </span> |
| </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.Util.UnicodeUtil"> |
| |
| |
| <h1 id="Lucene_Net_Util_UnicodeUtil" data-uid="Lucene.Net.Util.UnicodeUtil" class="text-break">Class UnicodeUtil |
| </h1> |
| <div class="markdown level0 summary"><p>Class to encode .NET's UTF16 <span class="xref">char[]</span> into UTF8 <span class="xref">byte[]</span> |
| without always allocating a new <span class="xref">byte[]</span> as |
| <span class="xref">System.Text.Encoding.GetBytes(System.String)</span> of <span class="xref">System.Text.Encoding.UTF8</span> does. |
| <p> |
| <div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div></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">UnicodeUtil</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.Util.html">Lucene.Net.Util</a></h6> |
| <h6><strong>Assembly</strong>: Lucene.Net.dll</h6> |
| <h5 id="Lucene_Net_Util_UnicodeUtil_syntax">Syntax</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static class UnicodeUtil</code></pre> |
| </div> |
| <h3 id="fields">Fields |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_BIG_TERM.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.BIG_TERM%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L109">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_BIG_TERM" data-uid="Lucene.Net.Util.UnicodeUtil.BIG_TERM">BIG_TERM</h4> |
| <div class="markdown level1 summary"><p>A binary term consisting of a number of 0xff bytes, likely to be bigger than other terms |
| (e.g. collation keys) one would normally encounter, and definitely bigger than any UTF-8 terms. |
| <p> |
| WARNING: this is not a valid UTF8 Term</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static readonly BytesRef BIG_TERM</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</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.Util.BytesRef.html">BytesRef</a></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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UNI_REPLACEMENT_CHAR.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UNI_REPLACEMENT_CHAR%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L115">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UNI_REPLACEMENT_CHAR" data-uid="Lucene.Net.Util.UnicodeUtil.UNI_REPLACEMENT_CHAR">UNI_REPLACEMENT_CHAR</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public const int UNI_REPLACEMENT_CHAR = 65533</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</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></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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UNI_SUR_HIGH_END.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UNI_SUR_HIGH_END%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L112">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UNI_SUR_HIGH_END" data-uid="Lucene.Net.Util.UnicodeUtil.UNI_SUR_HIGH_END">UNI_SUR_HIGH_END</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public const int UNI_SUR_HIGH_END = 56319</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</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></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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UNI_SUR_HIGH_START.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UNI_SUR_HIGH_START%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L111">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UNI_SUR_HIGH_START" data-uid="Lucene.Net.Util.UnicodeUtil.UNI_SUR_HIGH_START">UNI_SUR_HIGH_START</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public const int UNI_SUR_HIGH_START = 55296</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</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></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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UNI_SUR_LOW_END.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UNI_SUR_LOW_END%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L114">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UNI_SUR_LOW_END" data-uid="Lucene.Net.Util.UnicodeUtil.UNI_SUR_LOW_END">UNI_SUR_LOW_END</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public const int UNI_SUR_LOW_END = 57343</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</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></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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UNI_SUR_LOW_START.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UNI_SUR_LOW_START%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L113">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UNI_SUR_LOW_START" data-uid="Lucene.Net.Util.UnicodeUtil.UNI_SUR_LOW_START">UNI_SUR_LOW_START</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public const int UNI_SUR_LOW_START = 56320</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</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></td> |
| </tr> |
| </tbody> |
| </table> |
| <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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_CodePointCount_Lucene_Net_Util_BytesRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.CodePointCount(Lucene.Net.Util.BytesRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L575">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_CodePointCount_" data-uid="Lucene.Net.Util.UnicodeUtil.CodePointCount*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_CodePointCount_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.UnicodeUtil.CodePointCount(Lucene.Net.Util.BytesRef)">CodePointCount(BytesRef)</h4> |
| <div class="markdown level1 summary"><p>Returns the number of code points in this UTF8 sequence.</p> |
| <p><p>This method assumes valid UTF8 input. This method |
| <strong>does not perform</strong> full UTF8 validation, it will check only the |
| first byte of each codepoint (for multi-byte sequences any bytes after |
| the head are skipped).</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(BytesRef utf8)</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><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td> |
| <td><span class="parametername">utf8</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><span class="xref">System.Int32</span></td> |
| <td></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.ArgumentException</span></td> |
| <td><p>If invalid codepoint header byte occurs or the |
| content is prematurely truncated. </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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_NewString_System_Int32___System_Int32_System_Int32_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.NewString(System.Int32%5B%5D%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L701">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_NewString_" data-uid="Lucene.Net.Util.UnicodeUtil.NewString*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_NewString_System_Int32___System_Int32_System_Int32_" data-uid="Lucene.Net.Util.UnicodeUtil.NewString(System.Int32[],System.Int32,System.Int32)">NewString(Int32[], Int32, Int32)</h4> |
| <div class="markdown level1 summary"><p>Cover JDK 1.5 API. Create a String from an array of <code data-dev-comment-type="paramref" class="paramref">codePoints</code>.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static string NewString(int[] codePoints, int offset, int count)</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.Int32</span>[]</td> |
| <td><span class="parametername">codePoints</span></td> |
| <td><p>The code array. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">offset</span></td> |
| <td><p>The start of the text in the code point array. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">count</span></td> |
| <td><p>The number of code points. </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.String</span></td> |
| <td><p>a String representing the code points between offset and count. </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.ArgumentException</span></td> |
| <td><p>If an invalid code point is encountered. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.IndexOutOfRangeException</span></td> |
| <td><p>If the offset or count are out of bounds. </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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_ToCharArray_System_Int32___System_Int32_System_Int32_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.ToCharArray(System.Int32%5B%5D%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L720">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_ToCharArray_" data-uid="Lucene.Net.Util.UnicodeUtil.ToCharArray*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_ToCharArray_System_Int32___System_Int32_System_Int32_" data-uid="Lucene.Net.Util.UnicodeUtil.ToCharArray(System.Int32[],System.Int32,System.Int32)">ToCharArray(Int32[], Int32, Int32)</h4> |
| <div class="markdown level1 summary"><p>Generates char array that represents the provided input code points. |
| <p> |
| LUCENENET specific.</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[] ToCharArray(int[] codePoints, int offset, int count)</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.Int32</span>[]</td> |
| <td><span class="parametername">codePoints</span></td> |
| <td><p>The code array. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">offset</span></td> |
| <td><p>The start of the text in the code point array. </p> |
| </td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">count</span></td> |
| <td><p>The number of code points. </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><p>a char array representing the code points between offset and count. </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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_ToHexString_System_String_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.ToHexString(System.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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L772">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_ToHexString_" data-uid="Lucene.Net.Util.UnicodeUtil.ToHexString*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_ToHexString_System_String_" data-uid="Lucene.Net.Util.UnicodeUtil.ToHexString(System.String)">ToHexString(String)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static string ToHexString(string s)</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.String</span></td> |
| <td><span class="parametername">s</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><span class="xref">System.String</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_J2N_Text_ICharSequence_System_Int32_System_Int32_Lucene_Net_Util_BytesRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UTF16toUTF8(J2N.Text.ICharSequence%2CSystem.Int32%2CSystem.Int32%2CLucene.Net.Util.BytesRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L197">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF16toUTF8*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_J2N_Text_ICharSequence_System_Int32_System_Int32_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF16toUTF8(J2N.Text.ICharSequence,System.Int32,System.Int32,Lucene.Net.Util.BytesRef)">UTF16toUTF8(ICharSequence, Int32, Int32, BytesRef)</h4> |
| <div class="markdown level1 summary"><p>Encode characters from this <span class="xref">J2N.Text.ICharSequence</span>, starting at <code data-dev-comment-type="paramref" class="paramref">offset</code> |
| for <code data-dev-comment-type="paramref" class="paramref">length</code> characters. After encoding, <code>result.Offset</code> will always be 0.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void UTF16toUTF8(ICharSequence s, int offset, int length, BytesRef result)</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">J2N.Text.ICharSequence</span></td> |
| <td><span class="parametername">s</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">offset</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">length</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td> |
| <td><span class="parametername">result</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_System_Char___System_Int32_System_Int32_Lucene_Net_Util_BytesRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UTF16toUTF8(System.Char%5B%5D%2CSystem.Int32%2CSystem.Int32%2CLucene.Net.Util.BytesRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L129">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF16toUTF8*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_System_Char___System_Int32_System_Int32_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF16toUTF8(System.Char[],System.Int32,System.Int32,Lucene.Net.Util.BytesRef)">UTF16toUTF8(Char[], Int32, Int32, BytesRef)</h4> |
| <div class="markdown level1 summary"><p>Encode characters from a <span class="xref">char[]</span> <code data-dev-comment-type="paramref" class="paramref">source</code>, starting at |
| <code data-dev-comment-type="paramref" class="paramref">offset</code> for <code data-dev-comment-type="paramref" class="paramref">length</code> chars. After encoding, <code>result.Offset</code> will always be 0.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void UTF16toUTF8(char[] source, int offset, int length, BytesRef result)</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.Char</span>[]</td> |
| <td><span class="parametername">source</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">offset</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">length</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td> |
| <td><span class="parametername">result</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_System_String_System_Int32_System_Int32_Lucene_Net_Util_BytesRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UTF16toUTF8(System.String%2CSystem.Int32%2CSystem.Int32%2CLucene.Net.Util.BytesRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L266">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF16toUTF8*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UTF16toUTF8_System_String_System_Int32_System_Int32_Lucene_Net_Util_BytesRef_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF16toUTF8(System.String,System.Int32,System.Int32,Lucene.Net.Util.BytesRef)">UTF16toUTF8(String, Int32, Int32, BytesRef)</h4> |
| <div class="markdown level1 summary"><p>Encode characters from this <span class="xref">System.String</span>, starting at <code data-dev-comment-type="paramref" class="paramref">offset</code> |
| for <code data-dev-comment-type="paramref" class="paramref">length</code> characters. After encoding, <code>result.Offset</code> will always be 0. |
| <p> |
| LUCENENET specific.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void UTF16toUTF8(string s, int offset, int length, BytesRef result)</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.String</span></td> |
| <td><span class="parametername">s</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">offset</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">length</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td> |
| <td><span class="parametername">result</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_Lucene_Net_Util_BytesRef_Lucene_Net_Util_CharsRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UTF8toUTF16(Lucene.Net.Util.BytesRef%2CLucene.Net.Util.CharsRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L868">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF8toUTF16*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_Lucene_Net_Util_BytesRef_Lucene_Net_Util_CharsRef_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF8toUTF16(Lucene.Net.Util.BytesRef,Lucene.Net.Util.CharsRef)">UTF8toUTF16(BytesRef, CharsRef)</h4> |
| <div class="markdown level1 summary"><p>Utility method for <a class="xref" href="Lucene.Net.Util.UnicodeUtil.html#Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_System_Byte___System_Int32_System_Int32_Lucene_Net_Util_CharsRef_">UTF8toUTF16(Byte[], Int32, Int32, CharsRef)</a> </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void UTF8toUTF16(BytesRef bytesRef, CharsRef chars)</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><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td> |
| <td><span class="parametername">bytesRef</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Util.CharsRef.html">CharsRef</a></td> |
| <td><span class="parametername">chars</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_Lucene_Net_Util_BytesRef_Lucene_Net_Util_CharsRef__seealso">See Also</h5> |
| <div class="seealso"> |
| <div><a class="xref" href="Lucene.Net.Util.UnicodeUtil.html#Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_System_Byte___System_Int32_System_Int32_Lucene_Net_Util_CharsRef_">UTF8toUTF16(Byte[], Int32, Int32, CharsRef)</a></div> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_System_Byte___System_Int32_System_Int32_Lucene_Net_Util_CharsRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UTF8toUTF16(System.Byte%5B%5D%2CSystem.Int32%2CSystem.Int32%2CLucene.Net.Util.CharsRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L823">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF8toUTF16*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF16_System_Byte___System_Int32_System_Int32_Lucene_Net_Util_CharsRef_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF8toUTF16(System.Byte[],System.Int32,System.Int32,Lucene.Net.Util.CharsRef)">UTF8toUTF16(Byte[], Int32, Int32, CharsRef)</h4> |
| <div class="markdown level1 summary"><p>Interprets the given byte array as UTF-8 and converts to UTF-16. The <a class="xref" href="Lucene.Net.Util.CharsRef.html">CharsRef</a> will be extended if |
| it doesn't provide enough space to hold the worst case of each byte becoming a UTF-16 codepoint. |
| <p> |
| NOTE: Full characters are read, even if this reads past the length passed (and |
| can result in an <span class="xref">System.IndexOutOfRangeException</span> if invalid UTF-8 is passed). |
| Explicit checks for valid UTF-8 are not performed.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void UTF8toUTF16(byte[] utf8, int offset, int length, CharsRef chars)</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.Byte</span>[]</td> |
| <td><span class="parametername">utf8</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">offset</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">length</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Util.CharsRef.html">CharsRef</a></td> |
| <td><span class="parametername">chars</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_UTF8toUTF32_Lucene_Net_Util_BytesRef_Lucene_Net_Util_Int32sRef_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.UTF8toUTF32(Lucene.Net.Util.BytesRef%2CLucene.Net.Util.Int32sRef)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L613">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF32_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF8toUTF32*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_UTF8toUTF32_Lucene_Net_Util_BytesRef_Lucene_Net_Util_Int32sRef_" data-uid="Lucene.Net.Util.UnicodeUtil.UTF8toUTF32(Lucene.Net.Util.BytesRef,Lucene.Net.Util.Int32sRef)">UTF8toUTF32(BytesRef, Int32sRef)</h4> |
| <div class="markdown level1 summary"><p>This method assumes valid UTF8 input. This method |
| <strong>does not perform</strong> full UTF8 validation, it will check only the |
| first byte of each codepoint (for multi-byte sequences any bytes after |
| the head are skipped).</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static void UTF8toUTF32(BytesRef utf8, Int32sRef utf32)</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><a class="xref" href="Lucene.Net.Util.BytesRef.html">BytesRef</a></td> |
| <td><span class="parametername">utf8</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Util.Int32sRef.html">Int32sRef</a></td> |
| <td><span class="parametername">utf32</span></td> |
| <td></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.ArgumentException</span></td> |
| <td><p>If invalid codepoint header byte occurs or the |
| content is prematurely truncated. </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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_ValidUTF16String_J2N_Text_ICharSequence_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.ValidUTF16String(J2N.Text.ICharSequence)%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L384">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_J2N_Text_ICharSequence_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String(J2N.Text.ICharSequence)">ValidUTF16String(ICharSequence)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static bool ValidUTF16String(ICharSequence s)</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">J2N.Text.ICharSequence</span></td> |
| <td><span class="parametername">s</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><span class="xref">System.Boolean</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_ValidUTF16String_System_Char___System_Int32_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.ValidUTF16String(System.Char%5B%5D%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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L498">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_System_Char___System_Int32_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String(System.Char[],System.Int32)">ValidUTF16String(Char[], Int32)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static bool ValidUTF16String(char[] s, int size)</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.Char</span>[]</td> |
| <td><span class="parametername">s</span></td> |
| <td></td> |
| </tr> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td><span class="parametername">size</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><span class="xref">System.Boolean</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_ValidUTF16String_System_String_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.ValidUTF16String(System.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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L422">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_System_String_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String(System.String)">ValidUTF16String(String)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static bool ValidUTF16String(string s)</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.String</span></td> |
| <td><span class="parametername">s</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><span class="xref">System.Boolean</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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil_ValidUTF16String_System_Text_StringBuilder_.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil.ValidUTF16String(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/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L460">View Source</a> |
| </span> |
| <a id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String*"></a> |
| <h4 id="Lucene_Net_Util_UnicodeUtil_ValidUTF16String_System_Text_StringBuilder_" data-uid="Lucene.Net.Util.UnicodeUtil.ValidUTF16String(System.Text.StringBuilder)">ValidUTF16String(StringBuilder)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public static bool ValidUTF16String(StringBuilder s)</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">s</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><span class="xref">System.Boolean</span></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-beta00011/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_UnicodeUtil.md&value=---%0Auid%3A%20Lucene.Net.Util.UnicodeUtil%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/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net/Util/UnicodeUtil.cs/#L101" 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="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script> |
| </body> |
| </html> |