Class ReadingCharacter<TType>
A character with all possible readings (pronunciations).
Inheritance
Namespace: Romanization
Assembly: Romanization.NET.dll
Syntax
public class ReadingCharacter<TType> : object where TType : Enum
Type Parameters
Name | Description |
---|---|
TType | The reading type enum to use, which contains all supported readings for a given language or system. |
Fields
| Improve this Doc View SourceCharacter
The actual character value.
Note that this is not necessarily one char in length - some Hànzì characters go outside the Basic Multilingual Plane (BMP), and as such take up 32 bits (two 16-bit chars).
Declaration
public readonly string Character
Field Value
Type | Description |
---|---|
System.String |
Readings
The collection of known readings for the character, in order as specified in the function used to generate this object.
Declaration
public readonly Reading<TType>[] Readings
Field Value
Type | Description |
---|---|
Reading<TType>[] |
Methods
| Improve this Doc View SourceFlattenReadings()
Returns a string starting and ending with square brackets, containing all readings in the order they appear in Readings.
If the character has no known readings, the character itself is returned instead.
Example: [shuài lǜ lüe l̈ù]
Note this does not output the source of each reading.
Declaration
public string FlattenReadings()
Returns
Type | Description |
---|---|
System.String | A string representation of all readings of the character, or the character itself if there are none. |
ToString()
Returns a string that represents the current object.
The format is: '<char>' [<readings>]
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string with the character and all known readings. |