sqlite-utils/tests/utils.py

7 lines
109 B
Python
Raw Normal View History

import re
COLLAPSE_RE = re.compile(r"\s+")
def collapse_whitespace(s):
return COLLAPSE_RE.sub(" ", s)