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.
Hi,
These changes fix broken BSON and JavaScript translations of
string.StartsWith(s)
,string.EndsWith(s)
,string.Contains(s)
andstring.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 thelength
argument.Cheers, Dan.