搜索插件、代码仓与 APP 分类

插件详情v1.4.1

characters

使用对 Unicode/字形簇感知的操作进行字符串替换。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1140万
喜欢数
507
Pub 分数
160

安装插件

flutter pub add characters

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

characters 包为 Dart 提供了 Unicode 友好的字符串操作,确保索引和替换等操作尊重字形簇——由多个代码点组成的单个可见字符。该包使国际化应用中的文本处理更加安全和准确,尤其适用于用户输入复杂脚本或表情符号的场景。该包通过扩展 String 类并引入 Characters 类,正确处理组合标记和代理对等边缘情况。

适合场景

  • 国际化文本处理
  • 表情符号和复杂脚本处理
  • 安全的字符串切片和索引
  • 文本编辑中的正确光标定位
  • 准确的字符串长度计算
  • 用户输入验证

主要特点

  • 字形簇意识
  • Unicode 安全的字符串操作
  • 将 String 扩展为 Characters 类
  • 支持所有主要平台
  • 不可变且高效的設計
  • 全面的测试覆盖率

适合对象

  • 面向全球受众的应用
  • 文本编辑器和输入字段
  • 本地化和国际化项目
  • 使用表情符号或非拉丁脚本的应用程序
  • 需要精确字符串操作的开发者

使用建议

  • 增加最小开销
  • 需要显式使用 Characters 类
  • 对于仅包含 ASCII 字符的简单字符串不需要
  • 仅限字符串操作
  • 无其他包的运行时依赖

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Overview

This repository is home to various Dart packages under the dart.dev publisher.

Packages

Package Description Issues Version
args Library for defining parsers for parsing raw command-line arguments into a set of options and values using GNU and POSIX style options. issues pub package
async Utility functions and classes related to the 'dart:async' library. issues pub package
characters String replacement with operations that are Unicode/grapheme cluster aware. issues pub package
collection Collections and utilities functions and classes related to collections. issues pub package
convert Utilities for converting between data representations. Provides a number of Sink, Codec, Decoder, and Encoder types. issues pub package
crypto Implementations of SHA, MD5, and HMAC cryptographic functions. issues pub package
fixnum Library for 32- and 64-bit signed fixed-width integers with consistent behavior between native and JS runtimes. issues pub package
lints Official Dart lint rules. Defines the 'core' and 'recommended' set of lints suggested by the Dart team. issues pub package
logging Provides APIs for debugging and error logging, similar to loggers in other languages, such as the Closure JS Logger and java.util.logging.Logger. issues pub package
os_detect Platform independent OS detection. issues pub package
path A string-based path manipulation library. issues pub package
platform A pluggable, mockable platform information abstraction for Dart. issues pub package
typed_data Utility functions and classes related to the dart:typed_data library. issues pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

For additional information about contributing, see our contributing page.

所属分类

源码仓库

使用此插件的项目

所在榜单