mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Fix unicode bug
This commit is contained in:
parent
15de8c2345
commit
f2a0b60e79
@ -61,6 +61,7 @@ def rsplit(s, sep=None, maxsplit=-1):
|
|||||||
|
|
||||||
def normalizeWhitespace(s, removeNewline=True):
|
def normalizeWhitespace(s, removeNewline=True):
|
||||||
"""Normalizes the whitespace in a string; \s+ becomes one space."""
|
"""Normalizes the whitespace in a string; \s+ becomes one space."""
|
||||||
|
s = str(s)
|
||||||
if removeNewline:
|
if removeNewline:
|
||||||
s = str.replace(s, '\n', '')
|
s = str.replace(s, '\n', '')
|
||||||
while ' ' in s:
|
while ' ' in s:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user