Lines Matching refs:tstr
2780 tstr = str(part)
2781 if part.token_type == 'ptext' and set(tstr) & SPECIALS:
2782 # Encode if tstr contains special characters.
2785 tstr.encode(encoding)
2825 last_ew = _fold_as_ew(tstr, lines, maxlen, last_ew,
2829 if len(tstr) <= maxlen - len(lines[-1]):
2830 lines[-1] += tstr
2836 len(tstr) + 1 <= maxlen):
2839 lines.append(newline + tstr)
2859 lines.append(newline + tstr)
2862 lines[-1] += tstr
2968 tstr = "{}*={}''{}".format(name, charset, encoded_value)
2970 tstr = '{}={}'.format(name, quote_string(value))
2971 if len(lines[-1]) + len(tstr) + 1 < maxlen:
2972 lines[-1] = lines[-1] + ' ' + tstr
2974 elif len(tstr) + 2 <= maxlen:
2975 lines.append(' ' + tstr)