Corin1998's picture
Create util_text.py
6689da3 verified
raw
history blame contribute delete
101 Bytes
import re
def clean_text(t: str) -> str:
t = re.sub(r"\s+", " ", t or " ").strip()
return t