9 unstable releases (3 breaking)

0.4.0 Feb 26, 2025
0.3.0 Nov 23, 2024
0.2.0 May 28, 2024
0.1.5 Sep 22, 2023
0.1.0 Apr 29, 2021

#445 in Internationalization (i18n)

Download history 7524/week @ 2024-11-21 5294/week @ 2024-11-28 6811/week @ 2024-12-05 8018/week @ 2024-12-12 5600/week @ 2024-12-19 4053/week @ 2024-12-26 6353/week @ 2025-01-02 6978/week @ 2025-01-09 7002/week @ 2025-01-16 7424/week @ 2025-01-23 8030/week @ 2025-01-30 9180/week @ 2025-02-06 8178/week @ 2025-02-13 10587/week @ 2025-02-20 10834/week @ 2025-02-27 10777/week @ 2025-03-06

42,227 downloads per month
Used in 31 crates (4 directly)

Unicode-3.0

385KB
6.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

~240–760KB
~18K SLoC