Class UnicodeSpecsHelper
Helper Class which defines some Test Functions for testing the Unicode Category of Characters.
Inheritance
System.Object
UnicodeSpecsHelper
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()
Namespace: VDS.RDF.Parsing
Assembly: dotNetRDF.dll
Syntax
public class UnicodeSpecsHelper
Fields
| Improve this Doc View SourceHighSurrogateEnd
End of high surrogate range.
Declaration
public const int HighSurrogateEnd = 56319
Field Value
| Type | Description |
|---|---|
| System.Int32 |
HighSurrogateStart
Start of high surrogate range.
Declaration
public const int HighSurrogateStart = 55296
Field Value
| Type | Description |
|---|---|
| System.Int32 |
LowSurrogateEnd
End of low surrogate range.
Declaration
public const int LowSurrogateEnd = 57343
Field Value
| Type | Description |
|---|---|
| System.Int32 |
LowSurrogateStart
Start of low surrogate range.
Declaration
public const int LowSurrogateStart = 56320
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
| Improve this Doc View SourceConvertToChar(String)
Converts a Hex Escape into the relevant Unicode Character.
Declaration
public static char ConvertToChar(string hex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | hex | Hex code. |
Returns
| Type | Description |
|---|---|
| System.Char |
ConvertToChars(String)
Converts a Hex Escape into the relevant UTF-16 codepoints.
Declaration
public static char[] ConvertToChars(string hex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | hex |
Returns
| Type | Description |
|---|---|
| System.Char[] |
ConvertToUtf32(Char, Char)
Converts the value of a UTF-16 encoded surrogate pair into a Unicode code point.
Declaration
public static int ConvertToUtf32(char highSurrogate, char lowSurrogate)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | highSurrogate | A high surrogate code point (that is, a code point ranging from U+D800 through U+DBFF). |
| System.Char | lowSurrogate | A low surrogate code point (that is, a code point ranging from U+DC00 through U+DFFF). |
Returns
| Type | Description |
|---|---|
| System.Int32 |
The 21-bit Unicode code point represented by the highSurrogate and lowSurrogate parameters.
|
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | highSurrogate is not in the range U+D800 through U+DBFF, or lowSurrogate is not in the range U+DC00 through U+DFFF. |
IsDigit(Char)
Checks whether a given Character is considered a Digit.
Declaration
public static bool IsDigit(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c | Character to Test. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsHighSurrogate(Char)
Indicates whether the specified System.Char object is a high surrogate.
Declaration
public static bool IsHighSurrogate(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c | The Unicode character to evaluate. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
true if the numeric value of the c parameter ranges from U+D800 through U+DBFF; otherwise, false.
|
IsLetter(Char)
Checks whether a given Character is considered a Letter.
Declaration
public static bool IsLetter(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c | Character to Test. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsLetterModifier(Char)
Checks whether a given Character is considered a Letter Modifier.
Declaration
public static bool IsLetterModifier(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c | Character to Test. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsLetterOrDigit(Char)
Checks whether a given Character is considered a Letter or Digit.
Declaration
public static bool IsLetterOrDigit(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c | Character to Test. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsLowSurrogate(Char)
Indicates whether the specified System.Char object is a low surrogate.
Declaration
public static bool IsLowSurrogate(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c | The character to evaluate. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
true if the numeric value of the c parameter ranges from U+DC00 through U+DFFF; otherwise, false.
|