New answers tagged


(replace-regexp-in-string " " "" "Hello world")


(defun remove-whitespace (raw-string) (cl-reduce (lambda (acc char) (if (equal ?\s char) acc (concat acc (char-to-string char)))) raw-string :initial-value "")) OR (defun remove-whitespace (raw-string) (cl-reduce (lambda (acc char) (if (equal " " (char-to-string char)) ...


It seems I was suspecting the wrong encoding. The following code (using dash) (-> "íàïðèìåð" (encode-coding-string 'iso-8859-1) (decode-coding-string 'cp1251) insert) inserts "например" into a buffer. Though I don't have a clue what's going on) That's a total victory against these silly encodings, ladies and gentlemen!

Top 50 recent answers are included