mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
10 lines
262 B
Python
10 lines
262 B
Python
import re
|
|
|
|
|
|
class CharacterRemover:
|
|
def __init__(self):
|
|
self.version = "0.1"
|
|
|
|
def remove_control_characters(self, s) -> str:
|
|
"""Remove control characters from the string."""
|
|
return re.sub("[\\x00-\\x1F\\x7F]", "", s) if s else ""
|