Get the position of the last non ws char
" \r\n\r\n\r\n".getLastCharPos.should.equal(-1); " \r\n\t".getLastCharPos.should.equal(-1); " a \r\n\r\n\r\n b ".getLastCharPos.should.equal(10);
See Implementation