PeterO.Text.ICharacterInput
PeterO.Text.ICharacterInput
public interface ICharacterInput
An interface for reading Unicode code points from a data source.
Member Summary
Read(int[], int, int)
- Reads a sequence of Unicode code points from a data source.ReadChar()
- Reads a Unicode code point from a data source.
Read
int Read( int[] chars, int index, int length);
Reads a sequence of Unicode code points from a data source.
Parameters:
chars: Output buffer.
index: An index starting at 0 showing where the desired portion of chars begins.
length: The number of elements in the desired portion of chars (but not more than chars 's length).
Return Value:
Either a Unicode code point (from 0-0xd7ff or from 0xe000 to 0x10ffff), or the value -1 indicating the end of the source.
Exceptions:
System.ArgumentNullException: Should be thrown if chars is null.
System.ArgumentException: Either "index" or "length" is less than 0 or greater than "chars"'s length, or "chars"'s length minus "index" is less than "length".
ReadChar
int ReadChar();
Reads a Unicode code point from a data source.
Return Value:
Either a Unicode code point (from 0-0xd7ff or from 0xe000 to 0x10ffff), or the value -1 indicating the end of the source.