C# Class SIL.Utils.Surrogates

Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat bool

IsTrailSurrogate() public static méthode

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
Résultat bool

PrevChar() public static méthode

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
Résultat int