Registry / utility / icu-decimal

icu-decimal

JSON →
library2.2.0rscratesunverified

API for formatting basic decimal numbers in a locale-sensitive way.

# Cargo.toml [dependencies] icu_decimal = "2.2.0"
INSTALL
IMPORT
SIG · ICU-DECIMAL
I
icu-decimal
utilityrustv2.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DecimalFormatter
use icu_decimal::DecimalFormatter;

Formats a decimal number according to the en-US locale.

use icu_decimal::DecimalFormatter; use icu_locid::locale; fn main() -> Result<(), icu_decimal::Error> { let locale = locale!("en-US"); let formatter = DecimalFormatter::try_new(&locale.into(), Default::default())?; let formatted = formatter.format(1234567.89); println!("{}", formatted); Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
icu-decimal — cargo add icu-decimal · libregistry