Class GraphemeCluster
Grapheme cluster tools
Inheritance
object
GraphemeCluster
Namespace
Syntax
public static class GraphemeCluster
Methods
GetClusterWidth(string, int)
Gets the grapheme cluster width
Returns
int
Total width of the sequence
Declaration
public static int GetClusterWidth(string text, int clusterStart)
Parameters
| Name | Type | Description |
|---|---|---|
| text | string | Text to process |
| clusterStart | int | Position to start processing from |
GetLength(string, int)
Gets the length of the sequence from a specified position with forwards read
Returns
int
Total length of the sequence
Declaration
public static int GetLength(string text, int pos)
Parameters
| Name | Type | Description |
|---|---|---|
| text | string | Text to process |
| pos | int | Position to start processing from |
GetLengthBackward(string, int)
Gets the length of the sequence from a specified position with backwards read
Returns
int
Total length of the sequence
Declaration
public static int GetLengthBackward(string text, int pos)
Parameters
| Name | Type | Description |
|---|---|---|
| text | string | Text to process |
| pos | int | Position to start processing from |
GetStart(string, int)
Gets the start position of the grapheme cluster
Returns
int
Starting position
Declaration
public static int GetStart(string text, int index)
Parameters
| Name | Type | Description |
|---|---|---|
| text | string | Text to process |
| index | int | Index of text to start processing from |