Exemple #1
0
    def fun(self, data):
        old = self.options.get("old", None)
        new = self.options.get("new", "")
        as_string = pythonify(data)

        if old is None:
            return as_string
        else:
            return as_string.replace(old, new)
Exemple #2
0
 def fun(self, data):
     value = self.options.get("value", None)
     if value is None:
         return False
     else:
         return pythonify(data).startswith(value)
Exemple #3
0
    def fun(self, data):
        sep = self.options.get("sep", None)
        maxsplit = self.options.get("maxsplit", -1)

        return pythonify(data).split(sep, maxsplit)