;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; ;;;; Copyright IBM Corporation 1988,1991 - All Rights Reserved ;;;; ;;;; For full copyright information see:'andrew/config/COPYRITE' ;;;; ;;;; ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; $Disclaimer: ; Permission to use, copy, modify, and distribute this software and its ; documentation for any purpose is hereby granted without fee, ; provided that the above copyright notice appear in all copies and that ; both that copyright notice, this permission notice, and the following ; disclaimer appear in supporting documentation, and that the names of ; IBM, Carnegie Mellon University, and other copyright holders, not be ; used in advertising or publicity pertaining to distribution of the software ; without specific, written prior permission. ; ; IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS ; DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ; ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT ; SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER ; BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY ; DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, ; WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ; ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE ; OF THIS SOFTWARE. ; $ (defun a-pat-in-any-str (pattern strs) (do ((s strs (cdr s)) (result nil (re-strcontains pattern (car s)))) ((or (null s) result) result))) (defun any-pat-in-any-str (patterns strs) (do ((p patterns (cdr p)) (result nil (a-pat-in-any-str (car p) strs))) ((or (null p) result) result))) (defunv a-str-in-any-str (args) (let ((str (car args)) (strs (car (cdr args))) (ignoreCase (car (cdr (cdr args))))) (do ((s strs (cdr s)) (result nil (strcontains str (car s) ignoreCase))) ((or (null s) result) result)))) (defunv any-str-in-any-str (args) (let ((strs1 (car args)) (strs2 (car (cdr args))) (ignoreCase (car (cdr (cdr args))))) (do ((s strs1 (cdr s)) (result nil (a-str-in-any-str (car s) strs2 ignoreCase))) ((or (null s) result) result)))) (defun list-to-str (strs separator) (cond ((NULL strs) "") ((cdr strs) (strcat (car strs) separator (list-to-str (cdr strs) separator))) (T (car strs)))) (defun str-to-list (str delim) (let* ((foo (strdecompose delim str))) (cond (foo (cons (car foo) (str-to-list (car (cdr (cdr foo))) delim))) (t (list str)))))