add Cursor::isAtEnd()
Summary:
Add a helper method to efficiently check if the cursor is at the end of the
IOBuf chain. This is equivalent to (cursor.totalLength() > 0), but it doesn't
need to walk the entire chain just to tell if it is at the end or not.
Test Plan: Updated the unit tests to contain some checks for isAtEnd().
Reviewed By: jasmeetbagga@fb.com
Subscribers: trunkagent, doug, net-systems@, exa, folly-diffs@, yfeldblum
FB internal diff:
D1875345
Signature: t1:
1875345:
1425006512:
49ac246fd0ac7937fdcd6cf1359a841f048c444e