funcool

Anders Corlin 2024-01-29T20:48:21.015159Z

Just found that cuerdas string library latest versions 2023.10.15-405 & 407 have a pretty serious bug; trim considers capital E and Q as white space

(str/trim "Q dog slurped all Q")
=> "dog slurped all"
https://github.com/funcool/cuerdas/issues/91

Anders Corlin 2024-01-29T20:49:29.300539Z

From release notes: • "Add performance improvement for default case of trim, rtrim and ltrim (arity 1)" Something wrong with the new built-in regexp?

(def ^:private trim-default-re
  (-> "\n\f\r\t " rx/escape str->trim-re))

(.toString trim-default-re)
=> "^[\\Q\\Q\n\f\r\t \\E\\\\E\\Q\\E]+|[\\Q\\Q\n\f\r\t \\E\\\\E\\Q\\E]+$"

Anders Corlin 2024-01-29T20:56:07.173439Z

.... got a flashback to my childhood and this book about the Q-dog that slurped all Qs from all books and street signs because he thought they looked like sitting cats (with their tails to the right) ... thus explaining why there are no Swedish words with the letter Q ... 😃 🐕

😁 1