mirror of
https://github.com/ksherlock/prez.git
synced 2025-02-21 14:28:58 +00:00
better formatting for empty char strings.
This commit is contained in:
parent
15a232972e
commit
734f9e0056
1
utils.py
1
utils.py
@ -45,6 +45,7 @@ def format_string(bstring, quote=True):
|
|||||||
# rez "char" is a string of length 1.
|
# rez "char" is a string of length 1.
|
||||||
# 'x' is character literal which is a number.
|
# 'x' is character literal which is a number.
|
||||||
def format_char(x):
|
def format_char(x):
|
||||||
|
if x == 0: return '""'
|
||||||
c = _map.get(x, chr(x))
|
c = _map.get(x, chr(x))
|
||||||
return '"' + c + '"'
|
return '"' + c + '"'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user