Skip to main content

str_is_well_formed

Function str_is_well_formed 

Source
pub(crate) fn str_is_well_formed(
    _: &mut Interp,
    _t: Value,
    _a: &[Value],
) -> Result<Value, Value>
Expand description

String.prototype.isWellFormed()(ES2024)。内部表現が Rust の String(常に有効な UTF-8) であるため、単独サロゲート(lone surrogate)は構造上存在し得ず常に true を返す簡略実装。