"""Functions string manipulation.""" import re import const def cleanup_unicode(value): """Cleanup characters that are not supported by CloudSearch. Args: value (str): string to clean up Returns: str: cleaned string """ if value: value = re.sub(const.CLEANUP_PATTERN, '', value) return value