update setLength documentation to reflect code
Merge pull request #5392 from basarat/patch-1

update setLength documentation to reflect code