Revision 5814
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/strings.py | ||
---|---|---|
37 | 37 |
if str0_new_len < 0: return str1[:max_len] # str1 too long |
38 | 38 |
return str0[:str0_new_len]+str1 |
39 | 39 |
|
40 |
def join(sep, strs): |
|
41 |
'''Returns None if .join() returns ""''' |
|
42 |
return util.none_if(sep.join(strs), u'') |
|
43 |
|
|
40 | 44 |
def split(sep, str_): |
41 | 45 |
'''Returns [] if str_ == ""''' |
42 | 46 |
if str_ == '': return [] |
Also available in: Unified diff
strings.py: Added join()