anchor.diff:        (remove (code-char #x0d)
           str))))
   
  +;; from Common Lisp Cookbook -- Strings: http://cl-cookbook.sourceforge.net/strings.html#manip
  +(defun replace-all (string part replacement &key (test #'char=))
  +"Returns a new string in which all the occurences of the part is replaced with replacement."
  +    (with-output-to-string (out)
  +      (loop with part-length = (length part)
  +            for old-pos = 0 then (+ pos part-length)
  +            for pos = (search part string
  +                              :start2 old-pos
  +                              :test test)
  +            do (write-string string out
  +                             :start old-pos
  +                             :end (or pos (length string)))
  +            when pos do (write-string replacement out)
  +            while pos)))
  +
   ;; Predicate Tests for STP objects
   
   (defun class-row-p (obj)
  
positive.code:   (and (typep obj 'stp:element)
         (equal (stp:local-name obj) "div")
         (equal (stp:attribute-value obj "class") "value")))
  
  (defun img-tag-p (obj)
    "Test to verify object *obj* is an STP element img."
  
negative.code:                  (when (class-value-p tag)
                     (setf spell-type (strip-string (stp:string-value tag)))
                     (format t "Type: ~A, " spell-type))))
                ((search "textRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (let* ((text-pool ""))
                       (stp:do-children (par tag)
                         (when (class-cardtextbox-p par)
                           (stp:do-children (img par)
                             (if (img-tag-p img)
                                 (setf text-pool (format nil "~@{~A~^ ~}" (if text-pool text-pool "") (format nil "[~A]" (stp:attribute-value img "alt"))))
                                 (setf text-pool (format nil "~@{~A~^ ~}" (if text-pool text-pool "") (format nil "~A" (strip-string (stp:string-value img)))))))
                           (setf text-pool (format nil "~@{~A~^~}" (if text-pool text-pool "") "<br>"))))
                       (setf card-text (string-trim "<br> " text-pool)))
                     (if card-text (format t "Text: ~A, " card-text) (format t "Text: ~A, " "N")))))
                ((search "flavorRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (setf flavor-text (strip-string (stp:string-value tag)))
                     (if flavor-text (format t "Flavor: ~A, " flavor-text) (format t "Flavor: ~A, " "N")))))
                ((search "ptRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (let* ((pt-list (split-sequence #\/ (strip-string (stp:string-value tag))))
                            (pow (car pt-list))
                            (tuf (cadr pt-list)))
                       (setf power (strip-string pow)
                             toughness (strip-string tuf)))
                     (format t "P/T: ~@{~A~^/~}, " power toughness))))
                ((search "setRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (setf set-name (strip-string (stp:string-value tag)))
                     ; (setf the-set-id (get-expansion-id-by-name set-name))
                     (format t "Set: ~A, " set-name))))
                ((search "rarityRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (setf rarity (strip-string (stp:string-value tag)))
                     (format t "Rarity: ~A, " rarity))))
                ((search "numberRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (setf collectors-num (parse-integer (strip-string (stp:string-value tag)) :junk-allowed t))
                     (format t "CN: ~D, " collectors-num))))
                ((search "artistRow" (stp:attribute-value div "id") :from-end t)
                 (stp:do-children (tag div)
                   (when (class-value-p tag)
                     (setf artist (strip-string (stp:string-value tag)))
                     (format t "Artist: ~A. " artist))))
                (t nil))))
      (setf image (format nil "~D-~A.jpg" m-id (string-downcase (substitute #\- #\Space name))))
      (setf full-image-path (concatenate 'string (namestring *default-img-dir*) image))
  