removed unwanted trailing spaces from fpdf

This commit is contained in:
mdipierro
2012-08-23 08:36:50 -05:00
parent d03bf8af88
commit 36c1915883
8 changed files with 245 additions and 239 deletions
+6 -6
View File
@@ -15,12 +15,12 @@ def print_r(array):
array = dict([(k, k) for k in array])
for k, v in array.items():
print "[%s] => %s" % (k, v),
def UTF8ToUTF16BE(instr, setbom=True):
"Converts UTF-8 strings to UTF16-BE."
outstr = ""
if (setbom):
outstr += "\xFE\xFF";
outstr += "\xFE\xFF";
if not isinstance(instr, unicode):
instr = instr.decode('UTF-8')
outstr += instr.encode('UTF-16BE')
@@ -30,14 +30,14 @@ def UTF8StringToArray(instr):
"Converts UTF-8 strings to codepoints array"
return [ord(c) for c in instr]
# ttfints php helpers:
# ttfints php helpers:
def die(msg):
raise RuntimeError(msg)
def str_repeat(s, count):
return s * count
def str_pad(s, pad_length=0, pad_char= " ", pad_type= +1 ):
if pad_type<0: # pad left
return s.rjust(pad_length, pad_char)
@@ -46,4 +46,4 @@ def str_pad(s, pad_length=0, pad_char= " ", pad_type= +1 ):
else: # pad both
return s.center(pad_length, pad_char)
strlen = count = lambda s: len(s)
strlen = count = lambda s: len(s)