millermedeiros / amd-utils

modular JavaScript utilities written in the AMD format
http://millermedeiros.github.com/amd-utils
142 stars 11 forks source link

string/contains #78

Closed millermedeiros closed 12 years ago

millermedeiros commented 12 years ago

since Harmony has a new method on the string object String#contains() I think we should also implement it.

expect( contains('abc', 'b') ).toBe( true );
expect( contains('abc', 'bc') ).toBe( true );
expect( contains('abc', 'd') ).toBe( false );

more info: http://wiki.ecmascript.org/doku.php?id=harmony:string_extras