In string.split(), honor maxsplit (if > 0).

In string.splitfields(), ignore maxsplit if <= 0, rather than ignoring
maxsplit=0 but effectively treating negative numbers the same as
maxsplit=1.  Also made the test for maxsplit slightly more efficient
(set it to the length of the string when <= 0 so the test for its
presence can be omitted from the loop).
2 files changed