40ants / lisp-project-of-the-day

Here I'll post notes about Quicklisp projects. Also I publish them on Twitter account svetlyak40wt.
http://40ants.com/lisp-project-of-the-day/
BSD 2-Clause "Simplified" License
51 stars 6 forks source link

INFO: str:replace-using #17

Open vindarel opened 4 years ago

vindarel commented 4 years ago

Hello,

FYI this code:

(defun smile->unicode (text)
  (arrows:->>
      text
    (str:replace-all ":)" "๐Ÿ˜€")
    (str:replace-all ":|" "๐Ÿคจ")
    (str:replace-all ":(" "๐Ÿฅบ")))

can now use str:replace-using for multi-replacement:

    (defun smile->unicode (text)
           (str:replace-using '(":)" "๐Ÿ˜€" 
                                ":|" "๐Ÿคจ" 
                                ":(" "๐Ÿฅบ") 
                              text))

The function was added on June, 4th.