unorm_dart 0.1.2 copy "unorm_dart: ^0.1.2" to clipboard
unorm_dart: ^0.1.2 copied to clipboard

outdated

Unicode 8.0 Normalization - NFC, NFD, NFKC, NFKD. This is a Dart port of [walling/unorm](https://github.com/walling/unorm).

example/unorm_dart_example.dart

import "package:unorm_dart/unorm_dart.dart" as unorm;

void main() {
  print(unorm.nfkd("㍍ガバヴァぱばぐゞちぢ十人十色"));

  var text = "The \u212B symbol invented by A. J. \u00C5ngstr\u00F6m " +
      "(1814, L\u00F6gd\u00F6, \u2013 1874) denotes the length " +
      "10\u207B\u00B9\u2070 m.";

  var combining = RegExp(r"[\u0300-\u036F]/g");

  print("Regular:  ${text}");
  print("NFC:      ${unorm.nfc(text)}");
  print("NFKC:     ${unorm.nfkc(text)}");
  print("NFKD: *   ${unorm.nfkd(text).replaceAll(combining, "")}");
  print(" * = Combining characters removed from decomposed form.");
}
21
likes
0
pub points
92%
popularity

Publisher

unverified uploader

Unicode 8.0 Normalization - NFC, NFD, NFKC, NFKD. This is a Dart port of [walling/unorm](https://github.com/walling/unorm).

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on unorm_dart