Date: Sat, 26 Aug 2006 13:38:49 +0300 From: "Matti J. Karki" <mjk@iki.fi> To: "James Long" <list@museum.rain.com> Cc: freebsd-questions@freebsd.org Subject: Re: Code beautifiers, anyone? Message-ID: <1b15366e0608260338l2f4f0d20t1730e02f74a88ba2@mail.gmail.com> In-Reply-To: <20060826053106.GA81153@ns.museum.rain.com> References: <20060825204853.CD31D16A57C@hub.freebsd.org> <20060826053106.GA81153@ns.museum.rain.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/26/06, James Long <list@museum.rain.com> wrote: > > > > > inbuffer = re.sub('\n +', '\n', inbuffer) # Strip trailing whitespace > > > > This will strip spaces at the _beginning_ of line (leading spaces). > > Except, possibly, lines that begin at the first byte of the buffer, > such as the first line of the file, and any other lines that happen to > land across the buffer boundary just so. > Nice catch. I hadn't thought about that. -Matti
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1b15366e0608260338l2f4f0d20t1730e02f74a88ba2>