Re: Is there a string function to trim all non-ascii characters out of a string
- From: Paul McGuire <ptmcg@xxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 01:53:50 -0800 (PST)
On Dec 31, 2:54 am, abhishek <guptaabhishek1...@xxxxxxxxx> wrote:
Use this function --
def omitNonAscii(nstr):
sstr=''
for r in nstr:
if ord(r)<127:
sstr+=r
return sstr
<Yoda>
Learn the ways of the generator expression you must.
</Yoda>
See Dan Bishop's post.
-- Paul
.
- Follow-Ups:
- Re: Is there a string function to trim all non-ascii characters out of a string
- From: Torsten Bronger
- Re: Is there a string function to trim all non-ascii characters out of a string
- References:
- Is there a string function to trim all non-ascii characters out of a string
- From: silverburgh.meryl@xxxxxxxxx
- Re: Is there a string function to trim all non-ascii characters out of a string
- From: abhishek
- Is there a string function to trim all non-ascii characters out of a string
- Prev by Date: Re: evolution-python
- Next by Date: online dating with modern girs near you'r place
- Previous by thread: Re: Is there a string function to trim all non-ascii characters out of a string
- Next by thread: Re: Is there a string function to trim all non-ascii characters out of a string
- Index(es):
Relevant Pages
|