Fork me on GitHub
#funcool
<
2024-01-29
>
Anders Corlin20:01:21

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 Corlin20:01:29

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 Corlin20:01:07

.... 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