C# Class SIL.Utils.Surrogates

Datei anzeigen Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
IsLeadSurrogate ( char ch ) : bool

Whether the character is the first of a surrogate pair. This was copied from SIL.FieldWorks.IText

IsTrailSurrogate ( char ch ) : bool

Whether the character is the second of a surrogate pair. This was copied from SIL.FieldWorks.IText

PrevChar ( string st, int ich ) : int

Decrement an index into a string, allowing for surrogates. Assumes ich is pointing at the START of a character; will move back two if the two characters at ich-1 and ich-2 are a pair.

Method Details

IsLeadSurrogate() public static method

Whether the character is the first of a surrogate pair. This was copied from SIL.FieldWorks.IText
public static IsLeadSurrogate ( char ch ) : bool
ch char The character
return bool

IsTrailSurrogate() public static method

Whether the character is the second of a surrogate pair. This was copied from SIL.FieldWorks.IText
public static IsTrailSurrogate ( char ch ) : bool
ch char The character
return bool

PrevChar() public static method

Decrement an index into a string, allowing for surrogates. Assumes ich is pointing at the START of a character; will move back two if the two characters at ich-1 and ich-2 are a pair.
public static PrevChar ( string st, int ich ) : int
st string
ich int
return int