PeachDrawing.Text

PeachDrawing.Text.Unicode.Hyphenator

Hyphenator.FindBreakPoints(string, string) Method

The places a word may be broken with a hyphen.

public static System.Collections.Generic.IReadOnlyList<int> FindBreakPoints(string word, string? language);

Parameters

word System.String

The word, without surrounding punctuation.

language System.String

A BCP 47 language tag, such as de-AT; the closest supported language is used.

Returns

System.Collections.Generic.IReadOnlyList<System.Int32>
Each value i means a hyphen may go between word[i - 1] and word[i]. The list is empty when the language is unsupported, the word is shorter than that language’s minimums, or the word holds anything other than letters.