You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight Dart utility for accurately counting characters and words in **over 100 languages**, including CJK (Chinese, Japanese, Korean), RTL (Right-to-Left) scripts like Arabic and Hebrew, and mixed-language texts.
4
12
5
13
`text_counter` uses **Microsoft Word-compatible word counting logic**, ensuring consistent and familiar results across different writing systems. This makes it ideal for applications requiring accurate text metrics — such as content editors, writing tools, and input validation systems.
@@ -23,7 +31,7 @@ Add this to your package's `pubspec.yaml`:
|**Latin (Word-based)**| All other ISO 639-1 language codes not listed above, including: `en`,`de`,`es`,`fr`,`it`,`pt`,`nl`,`tr`,`pl`,`ca`,`sv`,`id`,`fi`,`vi`,`hi`,`uk`,`el`,`ms`,`cs`,`ro`,`da`,`hu`,`no`,`th`... |
|**Latin (Word-based)**| All other ISO 639-1 language codes not listed above, including: `en`,`de`,`es`,`fr`,`it`,`pt`,`nl`,`tr`,`pl`,`ca`,`sv`,`id`,`fi`,`vi`,`hi`,`uk`,`el`,`ms`,`cs`,`ro`,`da`,`hu`,`no`,`th`... |
62
70
63
71
> If no `languageCode` is provided, the library automatically detects script types and applies appropriate counting rules.
64
72
@@ -80,7 +88,7 @@ void main() {
80
88
## 📚 API Reference
81
89
82
90
```dart
83
-
int TextCounter.count(String text, {String? languageCode});
91
+
int TextCounter.count(String text, {String? languageCode})
0 commit comments