Commit cf211158 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #42 from undingen-strSplit2

parents 4b0d8ff5 3858e8ca
......@@ -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,6 +10,10 @@ print " test ".split()
print " test ".split(' ')
print " test ".split(None)
print "1<>2<>3".split('<>')
print " test ".rsplit()
print " test ".rsplit(' ')
print " test ".rsplit(None)
print "1<>2<>3".rsplit('<>')
print map(bool, ["hello", "", "world"])
......
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