Function mozjs::jsapi::JS::CheckRegExpSyntax

source ยท
pub unsafe extern "C" fn CheckRegExpSyntax(
    cx: *mut JSContext,
    chars: *const u16,
    length: usize,
    flags: RegExpFlags,
    error: MutableHandle<Value>,
) -> bool
Expand description

Check whether the given source is a valid regexp. If the regexp parses successfully, returns true and sets |error| to undefined. If the regexp has a syntax error, returns true, sets |error| to that error object, and clears the exception. Returns false on OOM or over-recursion.