hyphenatorx 1.0.0 hyphenatorx: ^1.0.0 copied to clipboard
Implementation of an hyphenation algorithm.
Hyphenator #
Implementation of an hyphenation algorithm.
The patterns used in the algorithm can be found here.
Install #
flutter pub add hyphenatorx
Usage #
final resource = await DefaultResourceLoader.load(
DefaultResourceLoaderLanguage.enUs
);
final hyphenator = Hyphenator(
resource: resource,
hyphenateSymbol:'_'
);
expect(
hyphenator.hyphenate('subdivision subdivision'),
'sub_di_vi_sion sub_di_vi_sion');
expect(
hyphenator.hyphenateWord('subdivision'),
'sub_di_vi_sion');
expect(
hyphenator.hyphenateWordToList('subdivision'),
['sub', 'di', 'vi', 'sion']);
Source #
This package is a copy of hyphenator.
This package has been updated to Dart 3.
I will have a look at a possible performance improvement and general refactoring.