Большое обновление всего проекта
This commit is contained in:
@@ -20,4 +20,7 @@ class Pipeline:
|
||||
for pipe in self.pipes:
|
||||
data = pipe.do(data)
|
||||
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
return data
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
Разбивает строку на токены через разделитель
|
||||
|
||||
Reference in New Issue
Block a user