11 releases

0.4.2 Apr 1, 2026
0.4.1 Oct 28, 2025
0.4.0 Feb 26, 2025
0.3.0 Nov 23, 2024
0.1.0 Apr 29, 2021

#117 in Text processing

Download history 90862/week @ 2026-02-25 94604/week @ 2026-03-04 95934/week @ 2026-03-11 109578/week @ 2026-03-18 96172/week @ 2026-03-25 98443/week @ 2026-04-01 91923/week @ 2026-04-08 86158/week @ 2026-04-15 85052/week @ 2026-04-22 75883/week @ 2026-04-29 70808/week @ 2026-05-06 91554/week @ 2026-05-13 102449/week @ 2026-05-20 106174/week @ 2026-05-27 125303/week @ 2026-06-03 95300/week @ 2026-06-10

447,937 downloads per month
Used in 217 crates (7 directly)

Unicode-3.0

340KB
5.5K SLoC

icu_pattern crates.io

icu_pattern is a utility crate of the ICU4X project.

It includes a Pattern type which supports patterns with various storage backends.

The types are tightly coupled with the writeable crate.

Examples

Parsing and interpolating with a single-placeholder pattern:

use icu_pattern::SinglePlaceholderPattern;
use writeable::assert_writeable_eq;

// Parse a pattern string:
let pattern = SinglePlaceholderPattern::try_from_str(
    "Hello, {0}!",
    Default::default(),
)
.unwrap();

// Interpolate into the pattern string:
assert_writeable_eq!(pattern.interpolate(["World"]), "Hello, World!");

More Information

For more information on development, authorship, contributing etc. please visit ICU4X home page.

Dependencies

~120–560KB
~13K SLoC