public
anonymous / the_stripper.py
Created

  • Download Gist
the_stripper.py
Python
1 2 3 4 5 6 7 8 9 10 11 12
def prestring(string=None):
'''
@summary: function to remove leading & trailing white spaces
'''
if string:
return string.lstrip().rstrip()
else:
return u''
 
c.faxno = u'+%s %s %s' % (prestring(faxnumbers.telecomcountrycode).replace(u' ', ''),
prestring(faxnumbers.areacitycode).replace(u' ', ''),
prestring(faxnumbers.subscribernumber).replace(u' ', ''))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.