Большое обновление всего проекта

This commit is contained in:
2024-01-15 03:45:18 +03:00
parent 827674ba4c
commit 026cc9b6bb
36 changed files with 760 additions and 617 deletions
+3
View File
@@ -20,4 +20,7 @@ class Pipeline:
for pipe in self.pipes:
data = pipe.do(data)
if data is None:
return None
return data
+16
View File
@@ -19,6 +19,22 @@ class ToLowerCase(PipeBase):
def do(self, data):
return data.lower()
class Strip(PipeBase):
"""
Удаляет пробелы в начале и конце строки
"""
def __init__(self):
"""
Конструктор
"""
super().__init__("strip", DataType.String, DataType.String)
self.description = "removes any leading and trailing whitespaces"
def do(self, data: str):
return data.strip()
class Split(PipeBase):
"""
Разбивает строку на токены через разделитель