JavaScript:SpiderMonkey:RegExp API: Difference between revisions

Jump to navigation Jump to search
m
Adding some junk that already exists. And some constness questions/changes
(Moving this here from MDC)
 
m (Adding some junk that already exists. And some constness questions/changes)
Line 8: Line 8:


==Routines==
==Routines==
<dt>JSObject * JS_NewRegExpObject(JSContext *cx, JSString *str, uintN flags, JSBool flat)</dt>
<dt>JSObject * JS_NewRegExpObjectFromString(JSContext *cx, <i>const?</i> JSString *str, uintN flags, JSBool flat)</dt>
<dd>Used to build a JSObject which holds a precompiled regular expression to be used in future routines.</dd>
<dd>Used to build a JSObject which holds a precompiled regular expression to be used in future routines.<br><i>I also am not entirely clear on what "flat" does, can someone explain it to me? --[[User:Crowder|Crowder]] 09:15, 31 August 2006 (PDT)</i></dd>


<dt>JSObject * JS_CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *parent)</dt>
<dt>JSObject * JS_CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *parent)</dt>
Line 17: Line 17:
<dd>Used to destroy the object built with JS_NewRegExpObject.</dd>
<dd>Used to destroy the object built with JS_NewRegExpObject.</dd>


<dt>JSBool JS_ExecuteRegExp(JSContext *cx, JSObject *re, JSString *input, JSBool test, jsval *rval)</dt>
<dt>JSBool JS_ExecuteRegExp(JSContext *cx, JSObject *re, <i>const?</i> JSString *input, JSBool test, jsval *rval)</dt>
<dd>Executes the expression compiled into ''re'' against ''input''.  ''test'' is a flag which dictates whether or not
<dd>Executes the expression compiled into ''re'' against ''input''.  ''test'' is a flag which dictates whether or not
we're actually interested in results beyond whether the expression matches or not (ie., for parenthesized parts of the
we're actually interested in results beyond whether the expression matches or not (ie., for parenthesized parts of the
Line 23: Line 23:
or a JSArray object containing the discovered result strings.  If rval is an array, the 0-index value contains the results
or a JSArray object containing the discovered result strings.  If rval is an array, the 0-index value contains the results
of any substitutions that occurred.</dd>
of any substitutions that occurred.</dd>
<dt>JSObject * JS_NewRegExpObject(JSContext *cx, char *bytes, size_t length, uintN flags)</dt>
<dd><i>Already exists.</i><br><i>Wonder why bytes is not const? --[[User:Crowder|Crowder]] 09:15, 31 August 2006 (PDT)</i></dd>
<dt>JSObject * JS_NewUCRegExpObject(JSContext *cx, jschar *chars, size_t length, uintN flags)</dt>
<dd><i>Already exists.</i></dd>
<dt>void JS_SetRegExpInput(JSContext *cx, JSString *input, JSBool multiline)</dt>
<dd><i>Already exists.</i></dd>
<dt>void JS_ClearRegExpStatics(JSContext *cx)</dt>
<dd><i>Already exists.</i></dd>
<dt>void JS_ClearRegExpRoots(JSContext *cx)</dt>
<dd><i>Already exists.</i></dd>


[[Category:SpiderMonkey]]
[[Category:SpiderMonkey]]
49

edits

Navigation menu