Ronan> I'm patching this rather haphazardly right now. Is it just me,
Ronan> or is elisp lacking either (a) a means of regexp-escaping a
Ronan> string, and/or (b) a function that does what INSTR used in
Ronan> BASIC, i.e. tell you if one string occurs within another
Ronan> (without any of that regexp stuff, obviously)?

GNU Emacs 19.34.1 and XEmacs 21.4.6 at least have 'regexp-quote' so
you can define substringp like this:

(defun substringp (little big)
  (not (not (string-match (regexp-quote little) big))))

(substringp "foo$()" "barfoo$()") => t

  But not without regexps.

-- 
Sam Mikes
[EMAIL PROTECTED]

_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to