Function

JSObjectMakeRegExp

Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor.

Declaration

JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception);

Parameters

ctx

The execution context to use.

argumentCount

An integer count of the number of arguments in arguments.

arguments

A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0.

exception

A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.

Return Value

A JSObject that is a RegExp.