test file for init optimization example

This commit is contained in:
Alvin Ryanputra 2025-01-22 15:02:24 -08:00
parent 9708f532e9
commit 8d5e90c741

View file

@ -0,0 +1,10 @@
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 ""