truncating strings

Seebs usenet-nospam at seebs.net
Wed Aug 24 00:21:18 EDT 2011


On 2011-08-23, Ethan Furman <ethan at stoneleaf.us> wrote:
> Ah -- that's only part of it -- the OP wants '...' to print as well.  :)

Ohhhh.  Hmm.

That's harder.  I can't think of a pretty way, so I think I'd probably
write a "prettytrunc(string, len)" or something similar.

-s
-- 
Copyright 2011, all wrongs reversed.  Peter Seebach / usenet-nospam at seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.



More information about the Python-list mailing list