Class Character
Mimics Java's Character class.
Inheritance
System.Object
Character
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.dll
Syntax
Fields
|
Improve this Doc
View Source
MAX_CODE_POINT
Declaration
public const int MAX_CODE_POINT = 1114111
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MAX_HIGH_SURROGATE
Declaration
public const char MAX_HIGH_SURROGATE = '\uDBFF'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
MAX_LOW_SURROGATE
Declaration
public const char MAX_LOW_SURROGATE = '\uDFFF'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
MAX_RADIX
Declaration
public const int MAX_RADIX = 36
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MAX_SURROGATE
Declaration
public const char MAX_SURROGATE = '\uDFFF'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
MIN_CODE_POINT
Declaration
public const int MIN_CODE_POINT = 0
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MIN_HIGH_SURROGATE
Declaration
public const char MIN_HIGH_SURROGATE = '\uD800'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
MIN_LOW_SURROGATE
Declaration
public const char MIN_LOW_SURROGATE = '\uDC00'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
MIN_RADIX
Declaration
public const int MIN_RADIX = 2
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MIN_SUPPLEMENTARY_CODE_POINT
Declaration
public const int MIN_SUPPLEMENTARY_CODE_POINT = 65536
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MIN_SURROGATE
Declaration
public const char MIN_SURROGATE = '\uD800'
Field Value
Type |
Description |
System.Char |
|
Methods
|
Improve this Doc
View Source
CharCount(Int32)
Declaration
public static int CharCount(int codePoint)
Parameters
Type |
Name |
Description |
System.Int32 |
codePoint |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointAt(ICharSequence, Int32)
Declaration
public static int CodePointAt(ICharSequence seq, int index)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointAt(Char, Char)
Declaration
public static int CodePointAt(char high, char low)
Parameters
Type |
Name |
Description |
System.Char |
high |
|
System.Char |
low |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointAt(Char[], Int32, Int32)
Declaration
public static int CodePointAt(char[] a, int index, int limit)
Parameters
Type |
Name |
Description |
System.Char[] |
a |
|
System.Int32 |
index |
|
System.Int32 |
limit |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointAt(String, Int32)
Declaration
public static int CodePointAt(string seq, int index)
Parameters
Type |
Name |
Description |
System.String |
seq |
|
System.Int32 |
index |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointAt(StringBuilder, Int32)
Declaration
public static int CodePointAt(StringBuilder seq, int index)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
seq |
|
System.Int32 |
index |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointBefore(Char[], Int32)
Declaration
public static int CodePointBefore(char[] seq, int index)
Parameters
Type |
Name |
Description |
System.Char[] |
seq |
|
System.Int32 |
index |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointCount(Char[], Int32, Int32)
Declaration
public static int CodePointCount(char[] a, int offset, int count)
Parameters
Type |
Name |
Description |
System.Char[] |
a |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CodePointCount(String, Int32, Int32)
Returns the number of Unicode code points in the text range of the specified char sequence.
The text range begins at the specified beginIndex
and extends to the char at index endIndex - 1
.
Thus the length (in System.Chars) of the text range is endIndex-beginIndex
.
Unpaired surrogates within the text range count as one code point each.
Declaration
public static int CodePointCount(string seq, int beginIndex, int endIndex)
Parameters
Type |
Name |
Description |
System.String |
seq |
the char sequence
|
System.Int32 |
beginIndex |
the index to the first char of the text range.
|
System.Int32 |
endIndex |
the index after the last char of the text range.
|
Returns
Type |
Description |
System.Int32 |
the number of Unicode code points in the specified text range
|
Exceptions
Type |
Condition |
System.IndexOutOfRangeException |
if the beginIndex is negative, or endIndex
is larger than the length of the given sequence, or beginIndex
is larger than endIndex .
|
|
Improve this Doc
View Source
Digit(Char, Int32)
Convenience method to determine the value of the specified character
c
in the supplied radix. The value of radix
must be
between MIN_RADIX and MAX_RADIX.
Declaration
public static int Digit(char c, int radix)
Parameters
Type |
Name |
Description |
System.Char |
c |
The character to determine the value of.
|
System.Int32 |
radix |
The radix.
|
Returns
Type |
Description |
System.Int32 |
The value of c in radix if radix lies
between MIN_RADIX and MAX_RADIX; -1 otherwise.
|
|
Improve this Doc
View Source
ForDigit(Int32, Int32)
Declaration
public static char ForDigit(int digit, int radix)
Parameters
Type |
Name |
Description |
System.Int32 |
digit |
|
System.Int32 |
radix |
|
Returns
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
GetType(Int32)
LUCENENET safe way to get unicode category. The .NET System.Char.ConvertFromUtf32(System.Int32)
method should be used first to be safe for surrogate pairs. However, if the value falls between
0x00d800 and 0x00dfff, that method throws an exception. So this is a wrapper that converts the
codepoint to a char in those cases.
This mimics the behavior of the Java Character.GetType class, but returns the .NET UnicodeCategory
enumeration for easy consumption.
Declaration
public static UnicodeCategory GetType(int codePoint)
Parameters
Type |
Name |
Description |
System.Int32 |
codePoint |
|
Returns
Type |
Description |
System.Globalization.UnicodeCategory |
A System.Globalization.UnicodeCategory representing the codePoint .
|
|
Improve this Doc
View Source
IsLetter(Int32)
Declaration
public static bool IsLetter(int c)
Parameters
Type |
Name |
Description |
System.Int32 |
c |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OffsetByCodePoints(Char[], Int32, Int32, Int32, Int32)
Declaration
public static int OffsetByCodePoints(char[] a, int start, int count, int index, int codePointOffset)
Parameters
Type |
Name |
Description |
System.Char[] |
a |
|
System.Int32 |
start |
|
System.Int32 |
count |
|
System.Int32 |
index |
|
System.Int32 |
codePointOffset |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
OffsetByCodePoints(String, Int32, Int32)
Declaration
public static int OffsetByCodePoints(string seq, int index, int codePointOffset)
Parameters
Type |
Name |
Description |
System.String |
seq |
|
System.Int32 |
index |
|
System.Int32 |
codePointOffset |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToChars(Int32)
Declaration
public static char[] ToChars(int codePoint)
Parameters
Type |
Name |
Description |
System.Int32 |
codePoint |
|
Returns
Type |
Description |
System.Char[] |
|
|
Improve this Doc
View Source
ToChars(Int32, Char[], Int32)
Declaration
public static int ToChars(int codePoint, char[] dst, int dstIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
codePoint |
|
System.Char[] |
dst |
|
System.Int32 |
dstIndex |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToCodePoint(Char, Char)
Declaration
public static int ToCodePoint(char high, char low)
Parameters
Type |
Name |
Description |
System.Char |
high |
|
System.Char |
low |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToLower(Int32)
Declaration
public static int ToLower(int codePoint)
Parameters
Type |
Name |
Description |
System.Int32 |
codePoint |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToUpper(Int32)
Declaration
public static int ToUpper(int codePoint)
Parameters
Type |
Name |
Description |
System.Int32 |
codePoint |
|
Returns
Type |
Description |
System.Int32 |
|
Extension Methods