code: def fold_text_string(self, prefix, hidden, **kwargs):
          
          import io
          output_buf = io.StringIO()
          self.fold_text(prefix=prefix, hidden=hidden, file=output_buf, **kwargs)
          return output_buf.getvalue()
docs: :param str prefix:
          :param str hidden:
          :param kwargs: passed to :func:`fold_text`
          :rtype: str