GetHyphenationPoint Method
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WinForms. SDK TXSpell.from the private NuGet feed or Text Control Offline Packagesdll
- Also in
TXTextControl.asTXSpell. Core. SDK TXSpell.dll
Description
Returns the next hyphenation point for a specific word right before a defined divide position. Using the first implementation that point is caluclated by applying the default hyphenation list. The second implementation uses a hyphenation list of the TXSpell.HyphenationLists collection or a list from the default hyphenation lists folder that corresponds to the specified language parameter (second implementation). If there is no hyphenation point before that divide position and the position is less the word length, the method returns 0. For divide positions greater than or equal to the number of word characters, the method returns the word length.
Syntax
GetHyphenationPoint(string, int)
Returns the next hyphenation point for a specific word right before a defined divide position. That point is calculated by using the default hyphenation list.
public int GetHyphenationPoint(string word, int devidePosition);Public Function GetHyphenationPoint(word As String, devidePosition As Integer) As Integer| Parameter | Description |
|---|---|
| word | The word to hyphenate. |
| devidePosition | The defined divide position. |
GetHyphenationPoint(string, int, CultureInfo)
Returns the next hyphenation point for a specific word right before a defined divide position. That point is calculated by using the hyphenation list that corresponds to the specified language parameter
public int GetHyphenationPoint(string word, int devidePosition, CultureInfo language);Public Function GetHyphenationPoint(word As String, devidePosition As Integer, language As CultureInfo) As Integer| Parameter | Description |
|---|---|
| word | The word to hyphenate. |
| devidePosition | The defined divide position. |
| language | The language, which is used to calculate the hyphenation point. If the TXSpell.HyphenationLists collection does not contain a hyphenation list, where its language does not equal exactly to the defined language parameter, the default hyphenation lists folder is examined for such a list. In case no corresponding list was found, both, first the TXSpell.HyphenationLists collection and finally the default hyphenation lists folder, are examined for a hyphenation list that equals roughly to specified language (e.g. the language parameter stands for English (USA) and the hyphenation list's language property represents English (Great Britain)). |
Return Value
The next hyphenation point right before the defined divide position.
Examples
The following example retrieves hyphenation point from the txspell.
var result = tXSpell.GetHyphenationPoint("Quarterly report", 100);
Console.WriteLine($"Get Hyphenation Point result: {result}");Dim result = tXSpell.GetHyphenationPoint("Quarterly report", 100)
Console.WriteLine($"Get Hyphenation Point result: {result}")