code: def str_func(name):
      
      def func(mapping, bind, values):
          for v in values:
              if isinstance(v, six.string_types):
                  v = getattr(v, name)()
              yield v
      return func
docs: Apply functions like upper(), lower() and strip().