[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Randomly capitalise letters

From: Stefan Monnier
Subject: Re: Randomly capitalise letters
Date: Thu, 22 Nov 2012 21:30:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>     (while (not (= start end))
>       (if (= 0 (random downcase-factor))
>           (upcase-region start (1+ start)))
>       (incf start))))

You could speed it up with something like

    (while (< start end)
      (upcase-region start (1+ start))
      (incf start (+ 1 (random downcase-factor))))

-- Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]