Commit e59a8453 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

entered into RCS

parent 58142744
......@@ -227,6 +227,25 @@ matched by parenthesis constructs in the pattern.")
if (val < 0) return Qnil;
return make_number (val);
/* Match REGEXP against STRING, searching all of STRING,
and return the index of the match, or negative on failure.
This does not clobber the match data. */
fast_string_match (regexp, string)
Lisp_Object regexp, string;
int val;
compile_pattern (regexp, &searchbuf, 0, 0);
immediate_quit = 1;
val = re_search (&searchbuf, (char *) XSTRING (string)->data,
XSTRING (string)->size, 0, XSTRING (string)->size,
immediate_quit = 0;
return val;
/* Search for COUNT instances of the character TARGET, starting at START.
If COUNT is negative, search backwards.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment