is_scalar

Function is_scalar 

Source
pub open spec fn is_scalar(v: u32) -> bool
Expand description
{
    ||| has_width_1_encoding(v)
    ||| has_width_2_encoding(v)
    ||| has_width_3_encoding(v)
    ||| has_width_4_encoding(v)

}

True when the given u32 represents a Unicode scalar, i.e., a value that can be encoded in UTF-8. This definition is equivalent to: 0 <= v <= 0x10ffff && !(0xD800 <= v <= 0xDFFF).