Commits

Waldemar Kornewald  committed 9755d85

added simple strip() implementation (not as full-featured as Python's version though)

  • Participants
  • Parent commits 4ffc9b9

Comments (0)

Files changed (1)

File pyvascript/stdlib.pyva

                             return iterable.join(self)
 String.prototype.lower = String.prototype.toLowerCase
 String.prototype.upper = String.prototype.toUpperCase
+String.prototype.strip = def(self):
+                             return self.replace(JS('/^\s\s*/'), '').replace(
+                                                                    JS('/\s\s*$/'), '')
 
 
 def isinstance(item, cls):