Type Alias icu::pattern::SinglePlaceholderPattern

source ·
pub type SinglePlaceholderPattern = Pattern<SinglePlaceholder>;
Expand description

§Examples

use core::str::FromStr;
use icu_pattern::SinglePlaceholderPattern;
use writeable::assert_writeable_eq;

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

// Interpolate some values into the pattern:
assert_writeable_eq!(pattern.interpolate(["Alice"]), "Hello, Alice!");

Aliased Type§

struct SinglePlaceholderPattern {
    pub store: str,
    /* private fields */
}

Fields§

§store: str

The encoded storage