craiggwilson / fluent-mongo

Provides a fluent interface on top of the 10gen driver including Linq.
172 stars 28 forks source link

Fix broken translations of string methods #17

Closed djcsdy closed 13 years ago

djcsdy commented 13 years ago

Hi,

These changes fix broken BSON and JavaScript translations of string.StartsWith(s), string.EndsWith(s), string.Contains(s) and string.SubString(beginIndex, length).

string.Contains(s) and friends were broken because they behaved incorrectly if the argument string contained regex metacharacters. I’ve added test cases covering the changes to the BSON translator for these methods.

The JavaScript translation of string.SubString(beginIndex, length) was broken because it ignored the length argument.

Cheers, Dan.

craiggwilson commented 13 years ago

Dude you rock. Thanks for your contributions...