LearnBoost/expect.js — pull request #85 by skeggse (2013-12-19 00:18:07+00:00)
Title: Add startsWith and endsWith

Adds shortcuts to check if a string/buffer (any object with a slice method and a length) starts with or ends with a given value.

```js
expect('hello').to.startWith('hello');
expect('hello').to.startWith('he');
expect('hello').to.startWith('');
expect('hello').to.not.startWith('H');
expect('goodbye').to.not.startWith('hello');

expect(new Buffer('hello')).to.endWith(new Buffer('hello'));
expect(new Buffer('hello')).to.endWith(new Buffer('lo'));
expect(new Buffer('hello')).to.endWith(new Buffer(''));
expect(new Buffer('hello')).to.not.endWith(new Buffer('O'));
expect(new Buffer('goodbye')).to.not.endWith(new Buffer('hello'));
```