Commit 3858e8ca authored by Marius Wachtler's avatar Marius Wachtler

Add string.rsplit: until the maxsplit parameter is implemented it can use string.split

parent c44dfc56
......@@ -422,6 +422,7 @@ void setupStr() {
CLFunction *strSplit = boxRTFunction((void*)strSplit1, LIST, 1, false);
addRTFunction(strSplit, (void*)strSplit2, LIST, 2, false);
str_cls->giveAttr("split", new BoxedFunction(strSplit));
str_cls->giveAttr("rsplit", str_cls->peekattr("split"));
CLFunction *__new__ = boxRTFunction((void*)strNew1, NULL, 1, false);
addRTFunction(__new__, (void*)strNew2, NULL, 2, false);
......
......@@ -10,3 +10,5 @@ print " test ".split()
print " test ".split(' ')
print " test ".split(None)
print "1<>2<>3".split('<>')
print " test ".rsplit()
print "1<>2<>3".rsplit('<>')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment