C# Class Lucene.Net.Support.Character

Mimics Java's Character class.
显示文件 Open project: apache/lucenenet

Public Properties

Property Type Description
MIN_SUPPLEMENTARY_CODE_POINT int

Public Methods

Method Description
CharCount ( int codePoint ) : int
CodePointAt ( ICharSequence seq, int index ) : int
CodePointAt ( char high, char low ) : int
CodePointAt ( char a, int index, int limit ) : int
CodePointAt ( string seq, int index ) : int
CodePointCount ( char a, int offset, int count ) : int
CodePointCount ( string seq, int beginIndex, int endIndex ) : int
ForDigit ( int digit, int radix ) : char

GetType ( int codePoint ) : UnicodeCategory

LUCENENET safe way to get unicode category. The .NET char.ConvertFromUtf32(int) 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.

IsLetter ( int c ) : bool
OffsetByCodePoints ( char a, int start, int count, int index, int codePointOffset ) : int

Copy of the implementation from Character class in Java http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Character.java

OffsetByCodePoints ( string seq, int index, int codePointOffset ) : int

Copy of the implementation from Character class in Java http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Character.java

ToChars ( int codePoint ) : char[]
ToChars ( int codePoint, char dst, int dstIndex ) : int
ToCodePoint ( char high, char low ) : int
ToLowerCase ( int codePoint ) : int
ToUpperCase ( int codePoint ) : int

Private Methods

Method Description
CodePointAtImpl ( char a, int index, int limit ) : int
CodePointCountImpl ( char a, int offset, int count ) : int
OffsetByCodePointsImpl ( char a, int start, int count, int index, int codePointOffset ) : int

Method Details

CharCount() public static method

public static CharCount ( int codePoint ) : int
codePoint int
return int

CodePointAt() public static method

public static CodePointAt ( ICharSequence seq, int index ) : int
seq ICharSequence
index int
return int

CodePointAt() public static method

public static CodePointAt ( char high, char low ) : int
high char
low char
return int

CodePointAt() public static method

public static CodePointAt ( char a, int index, int limit ) : int
a char
index int
limit int
return int

CodePointAt() public static method

public static CodePointAt ( string seq, int index ) : int
seq string
index int
return int

CodePointCount() public static method

public static CodePointCount ( char a, int offset, int count ) : int
a char
offset int
count int
return int

CodePointCount() public static method

public static CodePointCount ( string seq, int beginIndex, int endIndex ) : int
seq string
beginIndex int
endIndex int
return int

ForDigit() public static method

public static ForDigit ( int digit, int radix ) : char
digit int
radix int
return char

GetType() public static method

LUCENENET safe way to get unicode category. The .NET char.ConvertFromUtf32(int) 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.
public static GetType ( int codePoint ) : UnicodeCategory
codePoint int
return UnicodeCategory

IsLetter() public static method

public static IsLetter ( int c ) : bool
c int
return bool

OffsetByCodePoints() public static method

Copy of the implementation from Character class in Java http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Character.java
public static OffsetByCodePoints ( char a, int start, int count, int index, int codePointOffset ) : int
a char
start int
count int
index int
codePointOffset int
return int

OffsetByCodePoints() public static method

Copy of the implementation from Character class in Java http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Character.java
public static OffsetByCodePoints ( string seq, int index, int codePointOffset ) : int
seq string
index int
codePointOffset int
return int

ToChars() public static method

public static ToChars ( int codePoint ) : char[]
codePoint int
return char[]

ToChars() public static method

public static ToChars ( int codePoint, char dst, int dstIndex ) : int
codePoint int
dst char
dstIndex int
return int

ToCodePoint() public static method

public static ToCodePoint ( char high, char low ) : int
high char
low char
return int

ToLowerCase() public static method

public static ToLowerCase ( int codePoint ) : int
codePoint int
return int

ToUpperCase() public static method

public static ToUpperCase ( int codePoint ) : int
codePoint int
return int

Property Details

MIN_SUPPLEMENTARY_CODE_POINT public_oe static_oe property

public static int MIN_SUPPLEMENTARY_CODE_POINT
return int