搜尋分類、套件與程式碼儲存庫

GitHub 儲存庫yshrsmz/unorm-dart

unorm-dart

yshrsmz/unorm-dart open-source repository details.

unorm-dart 專案封面
星標
16
分支
6
最近推送(UTC)
2026年9月14日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

unorm_dart

Unit Test

Unicode 17.0 Normalization - NFC, NFD, NFKC, NFKD

Dart2 port of unorm

Functions

This module exports four functions: nfc, nfd, nfkc, and nfkd; one for each Unicode normalization. In the browser the functions are exported in the unorm global. In CommonJS environments you just require the module. Functions:

  • unorm.nfd(str) – Canonical Decomposition
  • unorm.nfc(str) – Canonical Decomposition, followed by Canonical Composition
  • unorm.nfkd(str) – Compatibility Decomposition
  • unorm.nfkc(str) – Compatibility Decomposition, followed by Canonical Composition

Usage

A simple usage example:

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

void main() {
  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]");

  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.");
}

Generating Unicode data

Manual Generation

To manually update the Unicode data and generate normalization files:

# Download latest Unicode data files
dart run tools/unicode_data_updater.dart

# Update lib/src/unormdata.dart
dart run tools/normalizer_gen.dart

Features and bugs

Please file feature requests and bugs at the issue tracker.

Yasuhiro SHIMIZU GitHub avatar
GitHub 作者

Yasuhiro SHIMIZU ↗

Android/Web developer

CyberAgent, Inc.Tokyo, Japan官方網站 ↗
語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項

  • test開發依賴^1.9.3
  • path開發依賴^1.9.1

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗